Partager via


ForeignKeyIndexConvention.CreateIndex Méthode

Définition

Crée un objet IConventionIndex.

protected virtual Microsoft.EntityFrameworkCore.Metadata.IConventionIndex CreateIndex (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool unique, Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder);
protected virtual Microsoft.EntityFrameworkCore.Metadata.IConventionIndex? CreateIndex (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool unique, Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder);
abstract member CreateIndex : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool * Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder -> Microsoft.EntityFrameworkCore.Metadata.IConventionIndex
override this.CreateIndex : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool * Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder -> Microsoft.EntityFrameworkCore.Metadata.IConventionIndex
Protected Overridable Function CreateIndex (properties As IReadOnlyList(Of IConventionProperty), unique As Boolean, entityTypeBuilder As IConventionEntityTypeBuilder) As IConventionIndex

Paramètres

properties
IReadOnlyList<IConventionProperty>

Propriétés qui constituent l’index.

unique
Boolean

Indique si l’index à créer doit être unique.

entityTypeBuilder
IConventionEntityTypeBuilder

Générateur pour le type d’entité.

Retours

Index créé.

S’applique à