Condividi tramite


MutableEntityTypeExtensions.SetPrimaryKey Metodo

Definizione

Imposta la chiave primaria per questo tipo di entità.

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

Parametri

entityType
IMutableEntityType

Tipo di entità su cui impostare la chiave.

property
IMutableProperty

Proprietà della chiave primaria.

Restituisce

Chiave appena creata.

Si applica a