Compartir a través de


IConventionEntityTypeBuilder.PrimaryKey Método

Definición

Sobrecargas

PrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

Establece las propiedades que componen la clave principal para este tipo de entidad.

PrimaryKey(IReadOnlyList<String>, Boolean)

Establece las propiedades que componen la clave principal para este tipo de entidad.

PrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

Establece las propiedades que componen la clave principal para este tipo de entidad.

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

Parámetros

properties
IReadOnlyList<IConventionProperty>

Propiedades que componen la clave principal.

fromDataAnnotation
Boolean

Indica si la configuración se especificó mediante una anotación de datos.

Devoluciones

Objeto que se puede usar para configurar la clave principal.

Se aplica a

PrimaryKey(IReadOnlyList<String>, Boolean)

Establece las propiedades que componen la clave principal para este tipo de entidad.

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

Parámetros

propertyNames
IReadOnlyList<String>

Nombres de las propiedades que componen la clave principal.

fromDataAnnotation
Boolean

Indica si la configuración se especificó mediante una anotación de datos.

Devoluciones

Objeto que se puede usar para configurar la clave principal.

Se aplica a