Share via


ConventionEntityTypeExtensions.AddIndex Méthode

Définition

Ajoute un index à ce type d’entité.

public static Microsoft.EntityFrameworkCore.Metadata.IConventionIndex AddIndex (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, bool fromDataAnnotation = false);
static member AddIndex : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionIndex
<Extension()>
Public Function AddIndex (entityType As IConventionEntityType, property As IConventionProperty, Optional fromDataAnnotation As Boolean = false) As IConventionIndex

Paramètres

entityType
IConventionEntityType

Type d'entité.

property
IConventionProperty

Propriété à indexer.

fromDataAnnotation
Boolean

Indique si la configuration a été spécifiée à l’aide d’une annotation de données.

Retours

Index nouvellement créé.

S’applique à