Table of Contents

Interface ITableIndex

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

Represents a table index.

public interface ITableIndex : IAnnotatable, IReadOnlyAnnotatable

Remarks

See Indexes for more information and examples.

Properties

Columns

Gets the columns that are participating in the index.

IReadOnlyList<IColumn> Columns { get; }

Property Value

IReadOnlyList<IColumn>

Filter

Gets the expression used as the index filter.

string? Filter { get; }

Property Value

string

IsDescending

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

IReadOnlyList<bool>? IsDescending { get; }

Property Value

IReadOnlyList<bool>

IsUnique

Gets a value indicating whether the index enforces uniqueness.

bool IsUnique { get; }

Property Value

bool

MappedIndexes

Gets the mapped indexes.

IEnumerable<IIndex> MappedIndexes { get; }

Property Value

IEnumerable<IIndex>

Name

Gets the name of the index.

string Name { get; }

Property Value

string

Table

Gets the table on with the index is declared.

ITable Table { get; }

Property Value

ITable

Methods

ToDebugString(MetadataDebugStringOptions, int)

Creates a human-readable representation of the given metadata.

Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.

string ToDebugString(MetadataDebugStringOptions options = 0, int indent = 0)

Parameters

options MetadataDebugStringOptions

Options for generating the string.

indent int

The number of indent spaces to use before each new line.

Returns

string

A human-readable representation.