EntityTypeExtensions.GetReferencingForeignKeys(IEntityType) Method

Definition

Gets all foreign keys that target a given entity type (i.e. foreign keys where the given entity type is the principal).

public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IForeignKey> GetReferencingForeignKeys (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType);
static member GetReferencingForeignKeys : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> seq<Microsoft.EntityFrameworkCore.Metadata.IForeignKey>
<Extension()>
Public Function GetReferencingForeignKeys (entityType As IEntityType) As IEnumerable(Of IForeignKey)

Parameters

entityType
IEntityType

The entity type.

Returns

The foreign keys that reference the given entity type.

Applies to