MutableEntityTypeExtensions.SetPrimaryKey(IMutableEntityType, IMutableProperty) Yöntem

Tanım

Bu varlık türü için birincil anahtarı ayarlar.

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

Parametreler

entityType
IMutableEntityType

Anahtarı ayarlanacak varlık türü.

property
IMutableProperty

Birincil anahtar özelliği.

Döndürülenler

IMutableKey

Yeni oluşturulan anahtar.

Şunlara uygulanır