Class ForeignKeyDefinition
Represents the definition of a foreign key constraint in the database model.
Inheritance
Namespace: Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class ForeignKeyDefinition
Constructors
View SourceForeignKeyDefinition()
Initializes a new, empty instance of the ForeignKeyDefinition class.
Declaration
public ForeignKeyDefinition()
Properties
View SourceForeignColumns
Gets or sets the collection of column names in the foreign table that are part of the foreign key constraint.
Declaration
public virtual ICollection<string> ForeignColumns { get; set; }
Property Value
| Type | Description |
|---|---|
| ICollection<string> |
ForeignTable
Gets or sets the name of the referenced (foreign) table in the foreign key relationship.
Declaration
public virtual string? ForeignTable { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ForeignTableSchema
Gets or sets the schema name of the foreign table.
Declaration
public virtual string? ForeignTableSchema { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Name
Gets or sets the name of the foreign key.
Declaration
public virtual string? Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
OnDelete
Gets or sets the action to take when a referenced row is deleted.
Declaration
public virtual Rule OnDelete { get; set; }
Property Value
| Type | Description |
|---|---|
| Rule |
OnUpdate
Gets or sets the action to take when the referenced key is updated.
Declaration
public virtual Rule OnUpdate { get; set; }
Property Value
| Type | Description |
|---|---|
| Rule |
PrimaryColumns
Gets or sets the collection of primary key column names involved in the foreign key.
Declaration
public virtual ICollection<string> PrimaryColumns { get; set; }
Property Value
| Type | Description |
|---|---|
| ICollection<string> |
PrimaryTable
Gets or sets the name of the primary (referenced) table in this foreign key relationship.
Declaration
public virtual string? PrimaryTable { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
PrimaryTableSchema
Gets or sets the schema name of the primary table in the foreign key relationship.
Declaration
public virtual string? PrimaryTableSchema { get; set; }
Property Value
| Type | Description |
|---|---|
| string |