Aracılığıyla paylaş


MutableEntityTypeExtensions.SetPrimaryKey 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ın ayarlanacağı varlık türü.

property
IMutableProperty

Birincil anahtar özelliği.

Döndürülenler

Yeni oluşturulan anahtar.

Şunlara uygulanır