MutableEntityTypeExtensions.GetOrAddForeignKey Yöntem

Tanım

Aşırı Yüklemeler

GetOrAddForeignKey(IMutableEntityType, IMutableProperty, IMutableKey, IMutableEntityType)

Mevcut bir ilişkiyi alır veya henüz tanımlanmamışsa yeni bir ilişki oluşturur.

GetOrAddForeignKey(IMutableEntityType, IReadOnlyList<IMutableProperty>, IMutableKey, IMutableEntityType)

Mevcut bir ilişkiyi alır veya henüz tanımlanmamışsa yeni bir ilişki oluşturur.

GetOrAddForeignKey(IMutableEntityType, IMutableProperty, IMutableKey, IMutableEntityType)

Mevcut bir ilişkiyi alır veya henüz tanımlanmamışsa yeni bir ilişki oluşturur.

public static Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey GetOrAddForeignKey (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, Microsoft.EntityFrameworkCore.Metadata.IMutableKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType principalEntityType);
static member GetOrAddForeignKey : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * Microsoft.EntityFrameworkCore.Metadata.IMutableProperty * Microsoft.EntityFrameworkCore.Metadata.IMutableKey * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey
<Extension()>
Public Function GetOrAddForeignKey (entityType As IMutableEntityType, property As IMutableProperty, principalKey As IMutableKey, principalEntityType As IMutableEntityType) As IMutableForeignKey

Parametreler

entityType
IMutableEntityType

Yabancı anahtarı almak veya eklemek için varlık türü.

property
IMutableProperty

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

principalKey
IMutableKey

Başvurulan birincil veya alternatif anahtar.

principalEntityType
IMutableEntityType

İ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

Mevcut veya yeni oluşturulan yabancı anahtar.

Şunlara uygulanır

GetOrAddForeignKey(IMutableEntityType, IReadOnlyList<IMutableProperty>, IMutableKey, IMutableEntityType)

Mevcut bir ilişkiyi alır veya henüz tanımlanmamışsa yeni bir ilişki oluşturur.

public static Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey GetOrAddForeignKey (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IMutableKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType principalEntityType);
static member GetOrAddForeignKey : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> * Microsoft.EntityFrameworkCore.Metadata.IMutableKey * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey
<Extension()>
Public Function GetOrAddForeignKey (entityType As IMutableEntityType, properties As IReadOnlyList(Of IMutableProperty), principalKey As IMutableKey, principalEntityType As IMutableEntityType) As IMutableForeignKey

Parametreler

entityType
IMutableEntityType

Yabancı anahtarı almak veya eklemek için varlık türü.

properties
IReadOnlyList<IMutableProperty>

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

principalKey
IMutableKey

Başvurulan birincil veya alternatif anahtar.

principalEntityType
IMutableEntityType

İ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

Mevcut veya yeni oluşturulan yabancı anahtar.

Şunlara uygulanır