Condividi tramite


MutableEntityTypeExtensions.AddKey Metodo

Definizione

Aggiunge una nuova chiave alternativa a questo tipo di entità.

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

Parametri

entityType
IMutableEntityType

Tipo di entità.

property
IMutableProperty

Proprietà da utilizzare come chiave alternativa.

Restituisce

Chiave appena creata.

Si applica a