Aracılığıyla paylaş


RuntimeEntityType.FindForeignKey Yöntem

Tanım

Belirli bir birincil veya alternatif anahtara işaret eden belirli özelliklerin yabancı anahtarını alır. Yabancı anahtar bulunamazsa döndürür null .

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey? FindForeignKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType principalEntityType);
abstract member FindForeignKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey
override this.FindForeignKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey
Public Overridable Function FindForeignKey (properties As IReadOnlyList(Of IReadOnlyProperty), principalKey As IReadOnlyKey, principalEntityType As IReadOnlyEntityType) As RuntimeForeignKey

Parametreler

properties
IReadOnlyList<IReadOnlyProperty>

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

principalKey
IReadOnlyKey

Başvuruda bulunan birincil veya alternatif anahtar.

principalEntityType
IReadOnlyEntityType

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

Döndürülenler

Yabancı anahtar veya null tanımlı değilse.

Şunlara uygulanır