Method HasCreateIndexOptions
- Namespace
- MongoDB.EntityFrameworkCore.Extensions
- Assembly
- MongoDB.EntityFrameworkCore.dll
HasCreateIndexOptions(IndexBuilder, CreateIndexOptions?)
Configures the MongoDB.Driver.CreateIndexOptions for the index.
public static IndexBuilder HasCreateIndexOptions(this IndexBuilder indexBuilder, CreateIndexOptions? options)
Parameters
indexBuilderIndexBuilderThe builder for the index being configured.
optionsCreateIndexOptionsThe MongoDB.Driver.CreateIndexOptions for this index.
Returns
- IndexBuilder
A builder to further configure the index.
HasCreateIndexOptions(IConventionIndexBuilder, CreateIndexOptions<BsonDocument>?, bool)
Configures the MongoDB.Driver.CreateIndexOptions for the index.
public static IConventionIndexBuilder? HasCreateIndexOptions(this IConventionIndexBuilder indexBuilder, CreateIndexOptions<BsonDocument>? options, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
optionsCreateIndexOptions<BsonDocument>The MongoDB.Driver.CreateIndexOptions for this index.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionIndexBuilder
The same builder instance if the configuration was applied, null otherwise.
HasCreateIndexOptions<TEntity>(IndexBuilder<TEntity>, CreateIndexOptions)
Configures the MongoDB.Driver.CreateIndexOptions for the index.
public static IndexBuilder<TEntity> HasCreateIndexOptions<TEntity>(this IndexBuilder<TEntity> indexBuilder, CreateIndexOptions options)
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
optionsCreateIndexOptionsThe MongoDB.Driver.CreateIndexOptions for this index.
Returns
- IndexBuilder<TEntity>
A builder to further configure the index.
Type Parameters
TEntityThe entity type being configured.