Condividi tramite


EntityTypeExtensions.FindKey(IEntityType, IProperty) Metodo

Definizione

Ottiene la chiave primaria o alternativa definita nella proprietà specificata. Restituisce null se non è definita alcuna chiave per la proprietà specificata.

public static Microsoft.EntityFrameworkCore.Metadata.IKey FindKey (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member FindKey : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Metadata.IKey
<Extension()>
Public Function FindKey (entityType As IEntityType, property As IProperty) As IKey

Parametri

entityType
IEntityType

Tipo di entità.

property
IProperty

Proprietà su cui è definita la chiave.

Restituisce

Chiave o Null se non è definito alcun valore.

Si applica a