EntityTypeExtensions.FindForeignKey(IEntityType, IProperty, IKey, IEntityType) Yöntem

Tanım

Belirtilen bir birincil veya alternatif anahtara işaret eden verilen özelliklerin yabancı anahtarını alır. nullYabancı anahtar bulunmazsa döndürür.

public static Microsoft.EntityFrameworkCore.Metadata.IForeignKey FindForeignKey (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Metadata.IKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IEntityType principalEntityType);
static member FindForeignKey : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Metadata.IKey * Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.Metadata.IForeignKey
<Extension()>
Public Function FindForeignKey (entityType As IEntityType, property As IProperty, principalKey As IKey, principalEntityType As IEntityType) As IForeignKey

Parametreler

entityType
IEntityType

Varlık türü.

property
IProperty

Yabancı anahtarın tanımlandığı özellik.

principalKey
IKey

Başvurulan birincil veya alternatif anahtar.

principalEntityType
IEntityType

İlişkinin hedeflediği varlık türü. Bu, principalKey ilişki bir devralma hiyerarşisinde türetilmiş bir türü hedeflediğinde (anahtar hiyerarşinin temel türünde tanımlandığından) tanımlanmış türden farklı olabilir.

Döndürülenler

IForeignKey

Yabancı anahtar veya null hiçbiri tanımlı değilse.

Şunlara uygulanır