EntityTypeExtensions.GetDeclaredForeignKeys(IEntityType) Method

Definition

Gets all foreign keys declared on the given IEntityType.

This method does not return foreign keys declared on base types. It is useful when iterating over all entity types to avoid processing the same foreign key more than once. Use GetForeignKeys() to also return foreign keys declared on base types.

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

Parameters

entityType
IEntityType

The entity type.

Returns

Declared foreign keys.

Applies to