Condividi tramite


IConventionEntityTypeBuilder.CanSetPrimaryKey Metodo

Definizione

Overload

CanSetPrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

Restituisce un valore che indica se le proprietà indicate possono essere impostate come chiave primaria per questo tipo di entità.

CanSetPrimaryKey(IReadOnlyList<String>, Boolean)

Restituisce un valore che indica se le proprietà indicate possono essere impostate come chiave primaria per questo tipo di entità.

CanSetPrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

Restituisce un valore che indica se le proprietà indicate possono essere impostate come chiave primaria per questo tipo di entità.

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

Parametri

properties
IReadOnlyList<IConventionProperty>

Proprietà che costituiscono la chiave primaria.

fromDataAnnotation
Boolean

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

Restituisce

true se le proprietà indicate possono essere impostate come chiave primaria.

Si applica a

CanSetPrimaryKey(IReadOnlyList<String>, Boolean)

Restituisce un valore che indica se le proprietà indicate possono essere impostate come chiave primaria per questo tipo di entità.

public bool CanSetPrimaryKey (System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
abstract member CanSetPrimaryKey : System.Collections.Generic.IReadOnlyList<string> * bool -> bool
Public Function CanSetPrimaryKey (propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As Boolean

Parametri

propertyNames
IReadOnlyList<String>

Nomi delle proprietà che costituiscono l'indice.

fromDataAnnotation
Boolean

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

Restituisce

true se le proprietà indicate possono essere impostate come chiave primaria.

Si applica a