ForeignKeyIndexConvention.CreateIndex Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework