Bagikan melalui


MutableEntityTypeExtensions.AddKey Metode

Definisi

Menambahkan kunci alternatif baru ke jenis entitas ini.

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

Parameter

entityType
IMutableEntityType

Jenis entitas.

property
IMutableProperty

Properti yang digunakan sebagai kunci alternatif.

Mengembalikan

Kunci yang baru dibuat.

Berlaku untuk