Class ForeignKeyDefinition
The foreign key definition
Inheritance
ForeignKeyDefinition
Assembly: FluentMigrator.Abstractions.dll
Syntax
public class ForeignKeyDefinition : ICloneable, ICanBeValidated, IValidatableObject
Properties
|
Edit this page
View Source
ForeignColumns
GEts or sets the foreign key column names
Declaration
public virtual ICollection<string> ForeignColumns { get; set; }
Property Value
|
Edit this page
View Source
ForeignTable
Gets or sets the foreign key table
Declaration
[Required(ErrorMessageResourceType = typeof(ErrorMessages), ErrorMessageResourceName = "ForeignTableNameCannotBeNullOrEmpty")]
public virtual string ForeignTable { get; set; }
Property Value
|
Edit this page
View Source
ForeignTableSchema
Gets or sets the foreign keys table schema
Declaration
public virtual string ForeignTableSchema { get; set; }
Property Value
|
Edit this page
View Source
Name
Gets or sets a foreign key name
Declaration
[Required(ErrorMessageResourceType = typeof(ErrorMessages), ErrorMessageResourceName = "ForeignKeyNameCannotBeNullOrEmpty")]
public virtual string Name { get; set; }
Property Value
|
Edit this page
View Source
OnDelete
Gets or sets the rule for a cascading DELETE
Declaration
public virtual Rule OnDelete { get; set; }
Property Value
|
Edit this page
View Source
OnUpdate
Gets or sets the rule for a cascading UPDATE
Declaration
public virtual Rule OnUpdate { get; set; }
Property Value
|
Edit this page
View Source
PrimaryColumns
Gets or sets the primary key column names
Declaration
public virtual ICollection<string> PrimaryColumns { get; set; }
Property Value
|
Edit this page
View Source
PrimaryTable
Gets or sets the primary table
Declaration
[Required(ErrorMessageResourceType = typeof(ErrorMessages), ErrorMessageResourceName = "PrimaryTableNameCannotBeNullOrEmpty")]
public virtual string PrimaryTable { get; set; }
Property Value
|
Edit this page
View Source
PrimaryTableSchema
Gets or sets the primary table schema
Declaration
public virtual string PrimaryTableSchema { get; set; }
Property Value
Methods
|
Edit this page
View Source
Clone()
Declaration
Returns
|
Edit this page
View Source
CollectValidationErrors(ICollection<string>)
Collect validation errors
Declaration
[Obsolete("Use the System.ComponentModel.DataAnnotations.Validator instead")]
public virtual void CollectValidationErrors(ICollection<string> errors)
Parameters
|
Edit this page
View Source
HasForeignAndPrimaryColumnsDefined()
Gets a value indicating whether primary and foreign key columns are defined
Declaration
public bool HasForeignAndPrimaryColumnsDefined()
Returns
|
Edit this page
View Source
Validate(ValidationContext)
Declaration
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
Parameters
Returns
Implements
Extension Methods