Bagikan melalui


IConventionForeignKeyBuilder.HasPrincipalKey Metode

Definisi

Overload

HasPrincipalKey(IReadOnlyList<IConventionProperty>, Boolean)

Mengonfigurasi properti yang ditargetkan hubungan ini.

HasPrincipalKey(IReadOnlyList<String>, Boolean)

Mengonfigurasi properti yang ditargetkan hubungan ini.

HasPrincipalKey(IReadOnlyList<IConventionProperty>, Boolean)

Mengonfigurasi properti yang ditargetkan hubungan ini.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder HasPrincipalKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder? HasPrincipalKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>? properties, bool fromDataAnnotation = false);
abstract member HasPrincipalKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder
Public Function HasPrincipalKey (properties As IReadOnlyList(Of IConventionProperty), Optional fromDataAnnotation As Boolean = false) As IConventionForeignKeyBuilder

Parameter

properties
IReadOnlyList<IConventionProperty>

Properti untuk hubungan ini ke target.

fromDataAnnotation
Boolean

Menunjukkan apakah konfigurasi ditentukan menggunakan anotasi data.

Mengembalikan

Instans penyusun yang sama jika properti dikonfigurasi sebagai target untuk hubungan ini, null jika tidak.

Berlaku untuk

HasPrincipalKey(IReadOnlyList<String>, Boolean)

Mengonfigurasi properti yang ditargetkan hubungan ini.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder HasPrincipalKey (System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder? HasPrincipalKey (System.Collections.Generic.IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false);
abstract member HasPrincipalKey : System.Collections.Generic.IReadOnlyList<string> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder
Public Function HasPrincipalKey (propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As IConventionForeignKeyBuilder

Parameter

propertyNames
IReadOnlyList<String>

Properti untuk hubungan ini ke target.

fromDataAnnotation
Boolean

Menunjukkan apakah konfigurasi ditentukan menggunakan anotasi data.

Mengembalikan

Instans penyusun yang sama jika properti dikonfigurasi sebagai target untuk hubungan ini, null jika tidak.

Berlaku untuk