Table of Contents

Interface IIndex

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

Represents an index on a set of properties.

public interface IIndex : IReadOnlyIndex, IAnnotatable, IReadOnlyAnnotatable
Inherited Members

Remarks

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).

IEntityType DeclaringEntityType { get; }

Property Value

IEntityType

Properties

Gets the properties that this index is defined on.

IReadOnlyList<IProperty> Properties { get; }

Property Value

IReadOnlyList<IProperty>

Methods

GetNullableValueFactory<TKey>()

Gets a factory for key values based on the index key values taken from various forms of entity data.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

IDependentKeyValueFactory<TKey> GetNullableValueFactory<TKey>()

Returns

IDependentKeyValueFactory<TKey>

The factory.

Type Parameters

TKey

The type of the index instance.