Partilhar via


IConventionIndexBuilder Interface

Definition

Provides a simple API surface for configuring an IConventionIndex from conventions.

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

public interface IConventionIndexBuilder : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
type IConventionIndexBuilder = interface
    interface IConventionAnnotatableBuilder
Public Interface IConventionIndexBuilder
Implements IConventionAnnotatableBuilder
Implements

Remarks

See Model building conventions for more information and examples.

Properties

Metadata

Gets the index being configured.

ModelBuilder

Gets the model builder.

(Inherited from IConventionAnnotatableBuilder)

Methods

CanRemoveAnnotation(String, Boolean)

Returns a value indicating whether an annotation with the given name can be removed using this configuration source.

(Inherited from IConventionAnnotatableBuilder)
CanSetAnnotation(String, Object, Boolean)

Returns a value indicating whether an annotation with the given name and value can be set from this configuration source.

(Inherited from IConventionAnnotatableBuilder)
CanSetIsDescending(IReadOnlyList<Boolean>, Boolean)

Returns a value indicating whether this index sort order can be configured from the current configuration source.

CanSetIsUnique(Nullable<Boolean>, Boolean)

Returns a value indicating whether this index uniqueness can be configured from the current configuration source.

HasAnnotation(String, Object, Boolean)

Sets the annotation stored under the given name. Overwrites the existing annotation if an annotation with the specified name already exists with same or lower ConfigurationSource.

HasNoAnnotation(String, Boolean)

Removes the annotation with the given name from this object.

HasNonNullAnnotation(String, Object, Boolean)

Sets the annotation stored under the given name. Overwrites the existing annotation if an annotation with the specified name already exists with same or lower ConfigurationSource. Removes the annotation if null value is specified.

IsDescending(IReadOnlyList<Boolean>, Boolean)

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

IsUnique(Nullable<Boolean>, Boolean)

Configures whether this index is unique (i.e. each set of values must be unique).

RemoveAnnotation(String, Boolean)
Obsolete.

Removes the annotation with the given name from this object.

(Inherited from IConventionAnnotatableBuilder)
SetOrRemoveAnnotation(String, Object, Boolean)
Obsolete.

Sets or removes the annotation stored under the given name.

(Inherited from IConventionAnnotatableBuilder)

Extension Methods

CanSetVectorIndexType(IConventionIndexBuilder, Nullable<VectorIndexType>, Boolean)

Returns a value indicating whether the vector index can be configured for vectors.

ForVectors(IConventionIndexBuilder, Nullable<VectorIndexType>, Boolean)

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.

CanSetDatabaseName(IConventionIndexBuilder, String, Boolean)

Returns a value indicating whether the given name can be set for the index.

CanSetFilter(IConventionIndexBuilder, String, Boolean)

Returns a value indicating whether the given expression can be set as the filter for the index.

CanSetName(IConventionIndexBuilder, String, Boolean)
Obsolete.

Returns a value indicating whether the given name can be set for the index.

HasDatabaseName(IConventionIndexBuilder, String, Boolean)

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

HasFilter(IConventionIndexBuilder, String, Boolean)

Configures the filter expression for the index.

HasName(IConventionIndexBuilder, String, Boolean)
Obsolete.

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

CanSetDataCompression(IConventionIndexBuilder, Nullable<DataCompressionType>, Boolean)

Returns a value indicating whether the index can be configured with data compression option when targeting SQL Server.

CanSetFillFactor(IConventionIndexBuilder, Nullable<Int32>, Boolean)

Returns a value indicating whether the index can be configured with fill factor option when targeting SQL Server.

CanSetIncludeProperties(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)

Returns a value indicating whether the given include properties can be set.

CanSetIsClustered(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

Returns a value indicating whether the index can be configured as clustered.

CanSetIsCreatedOnline(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

Returns a value indicating whether the index can be configured with online option when targeting SQL Server.

CanSetSortInTempDb(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

Returns a value indicating whether the index can be configured with sort in tempdb option when targeting SQL Server.

ForSqlServerInclude(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)
Obsolete.

Configures index include properties when targeting SQL Server.

ForSqlServerIsClustered(IConventionIndexBuilder, Nullable<Boolean>, Boolean)
Obsolete.

Configures whether the index is clustered when targeting SQL Server.

ForSqlServerIsCreatedOnline(IConventionIndexBuilder, Nullable<Boolean>, Boolean)
Obsolete.

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

HasFillFactor(IConventionIndexBuilder, Nullable<Int32>, Boolean)

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

IncludeProperties(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)

Configures index include properties when targeting SQL Server.

IsClustered(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

Configures whether the index is clustered when targeting SQL Server.

IsCreatedOnline(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

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

SortInTempDb(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

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

UseDataCompression(IConventionIndexBuilder, Nullable<DataCompressionType>, Boolean)

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

Applies to