Condividi tramite


IConventionEntityType.AddKey Metodo

Definizione

Overload

AddKey(IConventionProperty, Boolean)

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

AddKey(IReadOnlyList<IConventionProperty>, Boolean)

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

AddKey(IConventionProperty, Boolean)

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

public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionKey? AddKey (Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, bool fromDataAnnotation = false);
abstract member AddKey : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionKey
override this.AddKey : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionKey
Public Overridable Function AddKey (property As IConventionProperty, Optional fromDataAnnotation As Boolean = false) As IConventionKey

Parametri

property
IConventionProperty

Proprietà da utilizzare come chiave alternativa.

fromDataAnnotation
Boolean

Indica se la configurazione è stata specificata utilizzando un'annotazione dati.

Restituisce

Chiave appena creata.

Si applica a

AddKey(IReadOnlyList<IConventionProperty>, Boolean)

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

public Microsoft.EntityFrameworkCore.Metadata.IConventionKey AddKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.IConventionKey? AddKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool fromDataAnnotation = false);
abstract member AddKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionKey
Public Function AddKey (properties As IReadOnlyList(Of IConventionProperty), Optional fromDataAnnotation As Boolean = false) As IConventionKey

Parametri

properties
IReadOnlyList<IConventionProperty>

Proprietà che costituiscono la chiave alternativa.

fromDataAnnotation
Boolean

Indica se la configurazione è stata specificata utilizzando un'annotazione dati.

Restituisce

Chiave appena creata.

Si applica a