Method SetCreateIndexOptions
- Namespace
- MongoDB.EntityFrameworkCore.Extensions
- Assembly
- MongoDB.EntityFrameworkCore.dll
SetCreateIndexOptions(IConventionIndex, CreateIndexOptions?, bool)
Sets the MongoDB.Driver.CreateIndexOptions for the index.
public static CreateIndexOptions? SetCreateIndexOptions(this IConventionIndex index, CreateIndexOptions? createIndexOptions, bool fromDataAnnotation = false)
Parameters
indexIConventionIndexThe IConventionIndex to set the options for.
createIndexOptionsCreateIndexOptionsThe MongoDB.Driver.CreateIndexOptions containing the options for creating this index.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- CreateIndexOptions
The configured value.
SetCreateIndexOptions(IMutableIndex, CreateIndexOptions?)
Sets the MongoDB.Driver.CreateIndexOptions for the index.
public static void SetCreateIndexOptions(this IMutableIndex index, CreateIndexOptions? createIndexOptions)
Parameters
indexIMutableIndexThe IMutableIndex to set the options for.
createIndexOptionsCreateIndexOptionsThe MongoDB.Driver.CreateIndexOptions containing the options for creating this index.