Condividi tramite


IndexBuilder<T> Class

Definition

Provides a simple API for configuring an IMutableIndex.

public class IndexBuilder<T> : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
type IndexBuilder<'T> = class
    inherit IndexBuilder
Public Class IndexBuilder(Of T)
Inherits IndexBuilder

Type Parameters

T
Inheritance
IndexBuilder<T>

Remarks

Instances of this class are returned from methods when using the ModelBuilder API and it is not designed to be directly constructed in your application code.

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

Constructors

IndexBuilder<T>(IMutableIndex)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

IndexBuilder<T>(InternalIndexBuilder)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

Properties

Metadata

The index being configured.

(Inherited from IndexBuilder)

Methods

HasAnnotation(String, Object)

Adds or updates an annotation on the index. If an annotation with the key specified in annotation already exists its value will be updated.

IsDescending(Boolean[])

Configures the sort order(s) for the columns of this index (ascending or descending).

IsDescending(Boolean[])

Configures the sort order(s) for the columns of this index (ascending or descending).

(Inherited from IndexBuilder)
IsUnique(Boolean)

Configures whether this index is unique (i.e. the value(s) for each instance must be unique).

Explicit Interface Implementations

IInfrastructure<IConventionIndexBuilder>.Instance

The internal builder being used to configure the index.

(Inherited from IndexBuilder)
IInfrastructure<IMutableModel>.Instance

The model that the index belongs to.

(Inherited from IndexBuilder)
IInfrastructure<InternalIndexBuilder>.Instance

The internal builder being used to configure the index.

(Inherited from IndexBuilder)

Extension Methods

ForVectors(IndexBuilder, Nullable<VectorIndexType>)

Configures the index as a vector index with the given vector index type, such as "flat", "diskANN", or "quantizedFlat". See Vector Search in Azure Cosmos DB for NoSQL for more information.

ForVectors<TEntity>(IndexBuilder<TEntity>, Nullable<VectorIndexType>)

Configures whether the index as a vector index with the given vector index type, such as "flat", "diskANN", or "quantizedFlat". See Vector Search in Azure Cosmos DB for NoSQL for more information.

GetInfrastructure<T>(IInfrastructure<T>)

Gets the value from a property that is being hidden using IInfrastructure<T>.

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

HasDatabaseName(IndexBuilder, String)

Configures the name of the index in the database when targeting a relational database.

HasDatabaseName<TEntity>(IndexBuilder<TEntity>, String)

Configures the name of the index in the database when targeting a relational database.

HasFilter(IndexBuilder, String)

Configures the filter expression for the index.

HasFilter<TEntity>(IndexBuilder<TEntity>, String)

Configures the filter expression for the index.

HasName(IndexBuilder, String)
Obsolete.

Configures the name of the index in the database when targeting a relational database.

HasName<TEntity>(IndexBuilder<TEntity>, String)
Obsolete.

Configures the name of the index in the database when targeting a relational database.

ForSqlServerInclude(IndexBuilder, String[])
Obsolete.

Configures index include properties when targeting SQL Server.

ForSqlServerInclude<TEntity>(IndexBuilder<TEntity>, Expression<Func<TEntity,Object>>)
Obsolete.

Configures index include properties when targeting SQL Server.

ForSqlServerIsClustered(IndexBuilder, Boolean)
Obsolete.

Configures whether the index is clustered when targeting SQL Server.

ForSqlServerIsClustered<TEntity>(IndexBuilder<TEntity>, Boolean)
Obsolete.

Configures whether the index is clustered when targeting SQL Server.

ForSqlServerIsCreatedOnline(IndexBuilder, Boolean)
Obsolete.

Configures whether the index is created with online option when targeting SQL Server.

ForSqlServerIsCreatedOnline<TEntity>(IndexBuilder<TEntity>, Boolean)
Obsolete.

Configures whether the index is created with online option when targeting SQL Server.

HasFillFactor(IndexBuilder, Int32)

Configures whether the index is created with fill factor option when targeting SQL Server.

HasFillFactor<TEntity>(IndexBuilder<TEntity>, Int32)

Configures whether the index is created with fill factor option when targeting SQL Server.

IncludeProperties(IndexBuilder, String[])

Configures index include properties when targeting SQL Server.

IncludeProperties<TEntity>(IndexBuilder<TEntity>, Expression<Func<TEntity,Object>>)

Configures index include properties when targeting SQL Server.

IncludeProperties<TEntity>(IndexBuilder<TEntity>, String[])

Configures index include properties when targeting SQL Server.

IsClustered(IndexBuilder, Boolean)

Configures whether the index is clustered when targeting SQL Server.

IsClustered<TEntity>(IndexBuilder<TEntity>, Boolean)

Configures whether the index is clustered when targeting SQL Server.

IsCreatedOnline(IndexBuilder, Boolean)

Configures whether the index is created with online option when targeting SQL Server.

IsCreatedOnline<TEntity>(IndexBuilder<TEntity>, Boolean)

Configures whether the index is created with online option when targeting SQL Server.

SortInTempDb(IndexBuilder, Boolean)

Configures whether the index is created with sort in tempdb option when targeting SQL Server.

SortInTempDb<TEntity>(IndexBuilder<TEntity>, Boolean)

Configures whether the index is created with sort in tempdb option when targeting SQL Server.

UseDataCompression(IndexBuilder, DataCompressionType)

Configures whether the index is created with data compression option when targeting SQL Server.

UseDataCompression<TEntity>(IndexBuilder<TEntity>, DataCompressionType)

Configures whether the index is created with data compression option when targeting SQL Server.

Applies to