IndexBuilder<T> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
|
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
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
Entity Framework