Table of Contents

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

indexBuilder IndexBuilder

The builder for the index being configured.

options CreateIndexOptions

The 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

indexBuilder IConventionIndexBuilder

The builder for the index being configured.

options CreateIndexOptions<BsonDocument>

The MongoDB.Driver.CreateIndexOptions for this index.

fromDataAnnotation bool

Indicates 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

indexBuilder IndexBuilder<TEntity>

The builder for the index being configured.

options CreateIndexOptions

The MongoDB.Driver.CreateIndexOptions for this index.

Returns

IndexBuilder<TEntity>

A builder to further configure the index.

Type Parameters

TEntity

The entity type being configured.