Compartir a través de


IConventionEntityTypeBuilder.HasIndex Método

Definición

Sobrecargas

HasIndex(IReadOnlyList<IConventionProperty>, Boolean)

Configura un índice en las propiedades especificadas. Si hay un índice existente en la lista de propiedades especificada, se devolverá el índice existente para la configuración.

HasIndex(IReadOnlyList<String>, Boolean)

Configura un índice en los nombres de propiedad especificados. Si hay un índice existente en la lista especificada de nombres de propiedad, se devolverá el índice existente para la configuración.

HasIndex(IReadOnlyList<IConventionProperty>, String, Boolean)

Configura un índice en las propiedades especificadas, con el nombre especificado. Si hay un índice existente en el conjunto determinado de propiedades y con el nombre especificado, se devolverá el índice existente para la configuración.

HasIndex(IReadOnlyList<String>, String, Boolean)

Configura un índice en los nombres de propiedad especificados. Si hay un índice existente en la lista especificada de nombres de propiedad, se devolverá el índice existente para la configuración.

HasIndex(IReadOnlyList<IConventionProperty>, Boolean)

Configura un índice en las propiedades especificadas. Si hay un índice existente en la lista de propiedades especificada, se devolverá el índice existente para la configuración.

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

Parámetros

properties
IReadOnlyList<IConventionProperty>

Propiedades que componen el índice.

fromDataAnnotation
Boolean

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

Devoluciones

Objeto que se puede usar para configurar el índice si existe en el tipo de entidad; de lo contrario, null .

Se aplica a

HasIndex(IReadOnlyList<String>, Boolean)

Configura un índice en los nombres de propiedad especificados. Si hay un índice existente en la lista especificada de nombres de propiedad, se devolverá el índice existente para la configuración.

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

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

Objeto que se puede usar para configurar el índice si existe en el tipo de entidad; de lo contrario, null .

Se aplica a

HasIndex(IReadOnlyList<IConventionProperty>, String, Boolean)

Configura un índice en las propiedades especificadas, con el nombre especificado. Si hay un índice existente en el conjunto determinado de propiedades y con el nombre especificado, se devolverá el índice existente para la configuración.

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

Parámetros

properties
IReadOnlyList<IConventionProperty>

Propiedades que componen el índice.

name
String

El nombre del índice.

fromDataAnnotation
Boolean

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

Devoluciones

Objeto que se puede usar para configurar el índice si existe en el tipo de entidad; de lo contrario, null .

Se aplica a

HasIndex(IReadOnlyList<String>, String, Boolean)

Configura un índice en los nombres de propiedad especificados. Si hay un índice existente en la lista especificada de nombres de propiedad, se devolverá el índice existente para la configuración.

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

Parámetros

propertyNames
IReadOnlyList<String>

Nombres de las propiedades que componen el índice.

name
String

El nombre del índice.

fromDataAnnotation
Boolean

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

Devoluciones

Objeto que se puede usar para configurar el índice si existe en el tipo de entidad; de lo contrario, null .

Se aplica a