Class MongoMigrationExecutionContext
The MongoDB execution context handed to a Run(Func<IMigrationExecutionContext, CancellationToken, Task>) escape hatch: it exposes the target MongoDB.Driver.IMongoDatabase so a migration can do anything the driver allows when the fluent operations are not enough.
public sealed class MongoMigrationExecutionContext : IMigrationExecutionContext
- Inheritance
-
MongoMigrationExecutionContext
- Implements
- Inherited Members
- Extension Methods
Constructors
MongoMigrationExecutionContext(IMongoDatabase)
The MongoDB execution context handed to a Run(Func<IMigrationExecutionContext, CancellationToken, Task>) escape hatch: it exposes the target MongoDB.Driver.IMongoDatabase so a migration can do anything the driver allows when the fluent operations are not enough.
public MongoMigrationExecutionContext(IMongoDatabase database)
Parameters
databaseIMongoDatabaseThe target database.
Properties
Database
The target database.
public IMongoDatabase Database { get; }
Property Value
- IMongoDatabase