IConventionEntityType.AddIndex Method

Definition

Overloads

AddIndex(IConventionProperty, Boolean)

Adds an index to this entity type.

AddIndex(IReadOnlyList<IConventionProperty>, Boolean)

Adds an unnamed index to this entity type.

AddIndex(IConventionProperty, String, Boolean)

Adds a named index to this entity type.

AddIndex(IReadOnlyList<IConventionProperty>, String, Boolean)

Adds a named index to this entity type.

AddIndex(IConventionProperty, Boolean)

Adds an index to this entity type.

public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionIndex? AddIndex (Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, bool fromDataAnnotation = false);
abstract member AddIndex : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionIndex
override this.AddIndex : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionIndex
Public Overridable Function AddIndex (property As IConventionProperty, Optional fromDataAnnotation As Boolean = false) As IConventionIndex

Parameters

property
IConventionProperty

The property to be indexed.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The newly created index.

Applies to

AddIndex(IReadOnlyList<IConventionProperty>, Boolean)

Adds an unnamed index to this entity type.

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

Parameters

properties
IReadOnlyList<IConventionProperty>

The properties that are to be indexed.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The newly created index.

Applies to

AddIndex(IConventionProperty, String, Boolean)

Adds a named index to this entity type.

public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionIndex? AddIndex (Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string name, bool fromDataAnnotation = false);
abstract member AddIndex : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionIndex
override this.AddIndex : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionIndex
Public Overridable Function AddIndex (property As IConventionProperty, name As String, Optional fromDataAnnotation As Boolean = false) As IConventionIndex

Parameters

property
IConventionProperty

The property to be indexed.

name
String

The name of the index.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The newly created index.

Applies to

AddIndex(IReadOnlyList<IConventionProperty>, String, Boolean)

Adds a named index to this entity type.

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

Parameters

properties
IReadOnlyList<IConventionProperty>

The properties that are to be indexed.

name
String

The name of the index.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The newly created index.

Applies to