Table of Contents

Class SqlForeignKey

Namespace
LfrlAnvil.Sql.Objects
Assembly
LfrlAnvil.Sql.Core.dll

Represents an SQL foreign key constraint.

public abstract class SqlForeignKey : SqlConstraint, ISqlForeignKey, ISqlConstraint, ISqlObject
Inheritance
SqlForeignKey
Implements
Derived
Inherited Members
Extension Methods

Constructors

SqlForeignKey(SqlIndex, SqlIndex, SqlForeignKeyBuilder)

Creates a new SqlForeignKey instance.

protected SqlForeignKey(SqlIndex originIndex, SqlIndex referencedIndex, SqlForeignKeyBuilder builder)

Parameters

originIndex SqlIndex

SQL index that this foreign key originates from.

referencedIndex SqlIndex

SQL index referenced by this foreign key.

builder SqlForeignKeyBuilder

Source builder.

Properties

OnDeleteBehavior

Specifies this foreign key's on delete behavior.

public ReferenceBehavior OnDeleteBehavior { get; }

Property Value

ReferenceBehavior

OnUpdateBehavior

Specifies this foreign key's on update behavior.

public ReferenceBehavior OnUpdateBehavior { get; }

Property Value

ReferenceBehavior

OriginIndex

SQL index that this foreign key originates from.

public SqlIndex OriginIndex { get; }

Property Value

SqlIndex

ReferencedIndex

SQL index referenced by this foreign key.

public SqlIndex ReferencedIndex { get; }

Property Value

SqlIndex