IConventionForeignKeyBuilder.HasForeignKey Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Overload
HasForeignKey(IReadOnlyList<IConventionProperty>, Boolean) |
Mengonfigurasi properti yang akan digunakan sebagai kunci asing untuk hubungan ini. |
HasForeignKey(IReadOnlyList<String>, Boolean) |
Mengonfigurasi properti yang akan digunakan sebagai kunci asing untuk hubungan ini. |
HasForeignKey(IReadOnlyList<IConventionProperty>, Boolean)
Mengonfigurasi properti yang akan digunakan sebagai kunci asing untuk hubungan ini.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder HasForeignKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder? HasForeignKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>? properties, bool fromDataAnnotation = false);
abstract member HasForeignKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder
Public Function HasForeignKey (properties As IReadOnlyList(Of IConventionProperty), Optional fromDataAnnotation As Boolean = false) As IConventionForeignKeyBuilder
Parameter
- properties
- IReadOnlyList<IConventionProperty>
Properti yang digunakan sebagai kunci asing untuk hubungan ini.
- fromDataAnnotation
- Boolean
Menunjukkan apakah konfigurasi ditentukan menggunakan anotasi data.
Mengembalikan
Instans penyusun yang sama jika properti dikonfigurasi sebagai kunci asing, null
jika tidak.
Berlaku untuk
HasForeignKey(IReadOnlyList<String>, Boolean)
Mengonfigurasi properti yang akan digunakan sebagai kunci asing untuk hubungan ini.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder HasForeignKey (System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder? HasForeignKey (System.Collections.Generic.IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false);
abstract member HasForeignKey : System.Collections.Generic.IReadOnlyList<string> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder
Public Function HasForeignKey (propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As IConventionForeignKeyBuilder
Parameter
- propertyNames
- IReadOnlyList<String>
Properti yang digunakan sebagai kunci asing untuk hubungan ini.
- fromDataAnnotation
- Boolean
Menunjukkan apakah konfigurasi ditentukan menggunakan anotasi data.
Mengembalikan
Instans penyusun yang sama jika properti dikonfigurasi sebagai kunci asing, null
jika tidak.