Search Results for

    Show / Hide Table of Contents

    Class ForeignKeyDefinition

    The foreign key definition

    Inheritance
    object
    ForeignKeyDefinition
    Implements
    ICloneable
    ICanBeValidated
    IValidatableObject
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: FluentMigrator.Model
    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
    Type Description
    ICollection<string>
    | 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
    Type Description
    string
    | Edit this page View Source

    ForeignTableSchema

    Gets or sets the foreign keys table schema

    Declaration
    public virtual string ForeignTableSchema { get; set; }
    Property Value
    Type Description
    string
    | 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
    Type Description
    string
    | Edit this page View Source

    OnDelete

    Gets or sets the rule for a cascading DELETE

    Declaration
    public virtual Rule OnDelete { get; set; }
    Property Value
    Type Description
    Rule
    | Edit this page View Source

    OnUpdate

    Gets or sets the rule for a cascading UPDATE

    Declaration
    public virtual Rule OnUpdate { get; set; }
    Property Value
    Type Description
    Rule
    | Edit this page View Source

    PrimaryColumns

    Gets or sets the primary key column names

    Declaration
    public virtual ICollection<string> PrimaryColumns { get; set; }
    Property Value
    Type Description
    ICollection<string>
    | 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
    Type Description
    string
    | Edit this page View Source

    PrimaryTableSchema

    Gets or sets the primary table schema

    Declaration
    public virtual string PrimaryTableSchema { get; set; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    Clone()

    Creates a new object that is a copy of the current instance.

    Declaration
    public object Clone()
    Returns
    Type Description
    object

    A new object that is a copy of this instance.

    | 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
    Type Name Description
    ICollection<string> errors

    The collection of error messages

    | Edit this page View Source

    HasForeignAndPrimaryColumnsDefined()

    Gets a value indicating whether primary and foreign key columns are defined

    Declaration
    public bool HasForeignAndPrimaryColumnsDefined()
    Returns
    Type Description
    bool
    | Edit this page View Source

    Validate(ValidationContext)

    Determines whether the specified object is valid.

    Declaration
    public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
    Parameters
    Type Name Description
    ValidationContext validationContext

    The validation context.

    Returns
    Type Description
    IEnumerable<ValidationResult>

    A collection that holds failed-validation information.

    Implements

    ICloneable
    ICanBeValidated
    IValidatableObject

    Extension Methods

    LegacyValidationExtensions.CollectErrors(ICanBeValidated, ICollection<string>, IServiceProvider)
    LegacyValidationExtensions.TryCollectResults(ICanBeValidated, ICollection<ValidationResult>, IServiceProvider, IDictionary<object, object>)
    • Edit this page
    • View Source
    In this article
    Back to top
    Copyright © 2018 Fluent Migrator Project
    Generated by DocFX
    Creative Commons License
    FluentMigrator Documentation by FluentMigrator Project is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.