Share via


ForeignKeyIndexConvention.CreateIndex Method

Definition

Creates an 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

Parameters

properties
IReadOnlyList<IConventionProperty>

The properties that constitute the index.

unique
Boolean

Whether the index to create should be unique.

entityTypeBuilder
IConventionEntityTypeBuilder

The builder for the entity type.

Returns

The created index.

Applies to