Constructor MongoDatabaseCreationOptions
- Namespace
- MongoDB.EntityFrameworkCore.Metadata
- Assembly
- MongoDB.EntityFrameworkCore.dll
MongoDatabaseCreationOptions(bool, bool, bool, bool, TimeSpan?, CreateCollectionOptions?, bool, bool)
Creates a MongoDatabaseCreationOptions to determine which additional actions are taken when EnsureCreated(DatabaseFacade, MongoDatabaseCreationOptions) or EnsureCreatedAsync(DatabaseFacade, MongoDatabaseCreationOptions, CancellationToken)
public MongoDatabaseCreationOptions(bool CreateMissingCollections = true, bool CreateMissingIndexes = true, bool CreateMissingVectorIndexes = true, bool WaitForVectorIndexes = true, TimeSpan? IndexCreationTimeout = null, CreateCollectionOptions? CreateCollectionOptions = null, bool CreateMissingSearchIndexes = true, bool WaitForSearchIndexes = true)
Parameters
CreateMissingCollectionsboolCreates any MongoDB database collections that do not already exist. The default is true.
CreateMissingIndexesboolCreates any non-search and non-vector search MongoDB indexes that do not already exist. The default is true.
CreateMissingVectorIndexesboolCreates any MongoDB vector indexes that do not already exist. The default is true.
WaitForVectorIndexesboolWaits for all MongoDB vector indexes to be 'READY' before continuing. The default is true.
IndexCreationTimeoutTimeSpan?The minimum amount of time to wait for all indexes to be 'READY' before aborting. The default is 60 seconds. Zero seconds means no timeout.
CreateCollectionOptionsCreateCollectionOptionsThe options to use when creating the MongoDB database collections. The default is null.
CreateMissingSearchIndexesboolCreates any MongoDB search indexes that do not already exist. The default is true.
WaitForSearchIndexesboolWaits for all MongoDB search indexes to be 'READY' before continuing. The default is true.
MongoDatabaseCreationOptions()
Creates a MongoDatabaseCreationOptions with default values for all options.
public MongoDatabaseCreationOptions()