IConventionEntityTypeBuilder.HasKey(IReadOnlyList<IConventionProperty>, Boolean) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen özelliklerde zaten mevcut değilse, bu varlık türü için modelde alternatif bir anahtar oluşturur.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder HasKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder? HasKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool fromDataAnnotation = false);
abstract member HasKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder
Public Function HasKey (properties As IReadOnlyList(Of IConventionProperty), Optional fromDataAnnotation As Boolean = false) As IConventionKeyBuilder
Parametreler
- properties
- IReadOnlyList<IConventionProperty>
Anahtarın neden olduğu özellikler.
- fromDataAnnotation
- Boolean
Yapılandırmanın bir veri ek açıklaması kullanılarak mı belirtilmediğini belirtir.
Döndürülenler
Varlık türünde varsa anahtarı yapılandırmak için kullanılabilen bir nesne, null Aksi durumda.