Aracılığıyla paylaş


RuntimeEntityType.IEntityType.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 .

[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.IForeignKey? IEntityType.FindForeignKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType principalEntityType);
[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.IForeignKey IEntityType.FindForeignKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType principalEntityType);
[<System.Diagnostics.DebuggerStepThrough>]
abstract member Microsoft.EntityFrameworkCore.Metadata.IEntityType.FindForeignKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> Microsoft.EntityFrameworkCore.Metadata.IForeignKey
override this.Microsoft.EntityFrameworkCore.Metadata.IEntityType.FindForeignKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> Microsoft.EntityFrameworkCore.Metadata.IForeignKey
Function FindForeignKey (properties As IReadOnlyList(Of IReadOnlyProperty), principalKey As IReadOnlyKey, principalEntityType As IReadOnlyEntityType) As IForeignKey Implements IEntityType.FindForeignKey

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.

Uygulamalar

Öznitelikler

Şunlara uygulanır