Table of Contents

Interface IMutableIndex

Namespace
Microsoft.EntityFrameworkCore.Metadata
Assembly
Microsoft.EntityFrameworkCore.dll

Represents an index on a set of properties.

public interface IMutableIndex : IReadOnlyIndex, IMutableAnnotatable, IReadOnlyAnnotatable
Inherited Members

Remarks

This interface is used during model creation and allows the metadata to be modified. Once the model is built, IIndex represents a read-only view of the same metadata.

See Modeling entity types and relationships for more information and examples.

Properties

DeclaringEntityType

Gets the entity type the index is defined on. This may be different from the type that Properties are defined on when the index is defined a derived type in an inheritance hierarchy (since the properties may be defined on a base type).

IMutableEntityType DeclaringEntityType { get; }

Property Value

IMutableEntityType

IsDescending

A set of values indicating whether each corresponding index column has descending sort order.

IReadOnlyList<bool>? IsDescending { get; set; }

Property Value

IReadOnlyList<bool>

IsUnique

Gets or sets a value indicating whether the values assigned to the indexed properties are unique.

bool IsUnique { get; set; }

Property Value

bool

Properties

Gets the properties that this index is defined on.

IReadOnlyList<IMutableProperty> Properties { get; }

Property Value

IReadOnlyList<IMutableProperty>