Compartir a través de


IConventionEntityTypeBuilder.CanSetPrimaryKey Método

Definición

Sobrecargas

CanSetPrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

Devuelve un valor que indica si las propiedades especificadas se pueden establecer como clave principal para este tipo de entidad.

CanSetPrimaryKey(IReadOnlyList<String>, Boolean)

Devuelve un valor que indica si las propiedades especificadas se pueden establecer como clave principal para este tipo de entidad.

CanSetPrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

Devuelve un valor que indica si las propiedades especificadas se pueden establecer como clave principal para este tipo de entidad.

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

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

true si las propiedades especificadas se pueden establecer como clave principal.

Se aplica a

CanSetPrimaryKey(IReadOnlyList<String>, Boolean)

Devuelve un valor que indica si las propiedades especificadas se pueden establecer como clave principal para este tipo de entidad.

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

Parámetros

propertyNames
IReadOnlyList<String>

Nombres de las propiedades que componen el índice.

fromDataAnnotation
Boolean

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

Devoluciones

true si las propiedades especificadas se pueden establecer como clave principal.

Se aplica a