EntityTypeExtensions.FindForeignKeys Method

Definition

Overloads

FindForeignKeys(IEntityType, IProperty)

Gets the foreign keys defined on the given property. Only foreign keys that are defined on exactly the specified property are returned. Composite foreign keys that include the specified property are not returned.

FindForeignKeys(IEntityType, IReadOnlyList<IProperty>)

Gets the foreign keys defined on the given properties. Only foreign keys that are defined on exactly the specified set of properties are returned.

FindForeignKeys(IEntityType, IProperty)

Gets the foreign keys defined on the given property. Only foreign keys that are defined on exactly the specified property are returned. Composite foreign keys that include the specified property are not returned.

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

Parameters

entityType
IEntityType

The entity type.

property
IProperty

The property to find the foreign keys on.

Returns

The foreign keys.

Applies to

FindForeignKeys(IEntityType, IReadOnlyList<IProperty>)

Gets the foreign keys defined on the given properties. Only foreign keys that are defined on exactly the specified set of properties are returned.

public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IForeignKey> FindForeignKeys (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IProperty> properties);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.EntityFrameworkCore.EntityTypeExtensions+<FindForeignKeys>d__8))]
public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IForeignKey> FindForeignKeys (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IProperty> properties);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.EntityFrameworkCore.EntityTypeExtensions+<FindForeignKeys>d__27))]
public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IForeignKey> FindForeignKeys (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IProperty> properties);
static member FindForeignKeys : Microsoft.EntityFrameworkCore.Metadata.IEntityType * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IProperty> -> seq<Microsoft.EntityFrameworkCore.Metadata.IForeignKey>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.EntityFrameworkCore.EntityTypeExtensions+<FindForeignKeys>d__8))>]
static member FindForeignKeys : Microsoft.EntityFrameworkCore.Metadata.IEntityType * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IProperty> -> seq<Microsoft.EntityFrameworkCore.Metadata.IForeignKey>
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.EntityFrameworkCore.EntityTypeExtensions+<FindForeignKeys>d__27))>]
static member FindForeignKeys : Microsoft.EntityFrameworkCore.Metadata.IEntityType * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IProperty> -> seq<Microsoft.EntityFrameworkCore.Metadata.IForeignKey>
<Extension()>
Public Function FindForeignKeys (entityType As IEntityType, properties As IReadOnlyList(Of IProperty)) As IEnumerable(Of IForeignKey)
<Extension()>
Public Iterator Function FindForeignKeys (entityType As IEntityType, properties As IReadOnlyList(Of IProperty)) As IEnumerable(Of IForeignKey)

Parameters

entityType
IEntityType

The entity type.

properties
IReadOnlyList<IProperty>

The properties to find the foreign keys on.

Returns

The foreign keys.

Attributes

Applies to