MutableEntityTypeExtensions.FindForeignKey(IMutableEntityType, IProperty, IKey, IEntityType) Yöntem

Tanım

Verilen bir birincil veya alternatif anahtara bakan özellikler için yabancı anahtarı alır. Yabancı null anahtar bulunamasa döndürür.

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

Parametreler

entityType
IMutableEntityType

Varlık türü.

property
IProperty

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

principalKey
IKey

Başvurulan birincil veya alternatif anahtar.

principalEntityType
IEntityType

İlişkinin hedeflene varlık türü. Bu, ilişki bir devralma hiyerarşisinde türetilmiş bir türü hedeflese (anahtar hiyerarşinin temel türünde tanımlandığı için) üzerinde tanımlanan principalKey türden farklı olabilir.

Döndürülenler

IMutableForeignKey

Yabancı anahtar veya null tanımlanmamışsa.

Şunlara uygulanır