Search Results for

    Show / Hide Table of Contents
    View Source

    Class CreateForeignKeyExpression

    Represents an expression used to define a foreign key constraint as part of a database migration. This expression specifies the relationship between tables by linking columns in the source and target tables.

    Inheritance
    object
    MigrationExpressionBase
    Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class CreateForeignKeyExpression : MigrationExpressionBase, IMigrationExpression

    Constructors

    View Source

    CreateForeignKeyExpression(IMigrationContext)

    Initializes a new instance of the CreateForeignKeyExpression class using the specified migration context.

    Declaration
    public CreateForeignKeyExpression(IMigrationContext context)
    Parameters
    Type Name Description
    IMigrationContext context

    The IMigrationContext to be used for the migration operation.

    View Source

    CreateForeignKeyExpression(IMigrationContext, ForeignKeyDefinition)

    Initializes a new instance of the CreateForeignKeyExpression class with the specified migration context and foreign key definition.

    Declaration
    public CreateForeignKeyExpression(IMigrationContext context, ForeignKeyDefinition fkDef)
    Parameters
    Type Name Description
    IMigrationContext context

    The IMigrationContext to use for the migration.

    ForeignKeyDefinition fkDef

    The ForeignKeyDefinition that defines the foreign key.

    Properties

    View Source

    ForeignKey

    Gets or sets the ForeignKeyDefinition representing the foreign key associated with this expression.

    Declaration
    public ForeignKeyDefinition ForeignKey { get; set; }
    Property Value
    Type Description
    ForeignKeyDefinition

    Methods

    View Source

    GetSql()

    Declaration
    protected override string GetSql()
    Returns
    Type Description
    string
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX