Condividi tramite


IConventionEntityTypeBuilder.PrimaryKey Metodo

Definizione

Overload

PrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

Imposta le proprietà che costituiscono la chiave primaria per questo tipo di entità.

PrimaryKey(IReadOnlyList<String>, Boolean)

Imposta le proprietà che costituiscono la chiave primaria per questo tipo di entità.

PrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

Imposta le proprietà che costituiscono la chiave primaria per questo tipo di entità.

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

Parametri

properties
IReadOnlyList<IConventionProperty>

Proprietà che costituiscono la chiave primaria.

fromDataAnnotation
Boolean

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

Restituisce

Oggetto che può essere utilizzato per configurare la chiave primaria.

Si applica a

PrimaryKey(IReadOnlyList<String>, Boolean)

Imposta le proprietà che costituiscono la chiave primaria per questo tipo di entità.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder? PrimaryKey (System.Collections.Generic.IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false);
abstract member PrimaryKey : System.Collections.Generic.IReadOnlyList<string> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder
Public Function PrimaryKey (propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As IConventionKeyBuilder

Parametri

propertyNames
IReadOnlyList<String>

Nomi delle proprietà che costituiscono la chiave primaria.

fromDataAnnotation
Boolean

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

Restituisce

Oggetto che può essere utilizzato per configurare la chiave primaria.

Si applica a