Table of Contents

Interface IForeignKeyConstraint

Namespace
Microsoft.EntityFrameworkCore.Metadata
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

Represents a foreign key constraint.

public interface IForeignKeyConstraint : IAnnotatable
Extension Methods

Properties

Columns

Gets the columns that are participating in the foreign key constraint.

IReadOnlyList<IColumn> Columns { get; }

Property Value

IReadOnlyList<IColumn>

MappedForeignKeys

Gets the mapped foreign keys.

IEnumerable<IForeignKey> MappedForeignKeys { get; }

Property Value

IEnumerable<IForeignKey>

Name

Gets the name of the foreign key constraint.

string Name { get; }

Property Value

string

OnDeleteAction

Gets the action to be performed when the referenced row is deleted.

ReferentialAction OnDeleteAction { get; }

Property Value

ReferentialAction

PrincipalColumns

Gets the columns that are referenced by the foreign key constraint.

IReadOnlyList<IColumn> PrincipalColumns { get; }

Property Value

IReadOnlyList<IColumn>

PrincipalTable

Gets the table that is referenced by the foreign key constraint.

ITable PrincipalTable { get; }

Property Value

ITable

Table

Gets the table on with the foreign key constraint is declared.

ITable Table { get; }

Property Value

ITable