Class MongoClientWrapper
- Namespace
- MongoDB.EntityFrameworkCore.Storage
- Assembly
- MongoDB.EntityFrameworkCore.dll
Provides the implementation of the IMongoClientWrapper between the MongoDB Entity Framework provider and the underlying MongoDB.Driver.IMongoClient.
public class MongoClientWrapper : IMongoClientWrapper
- Inheritance
-
MongoClientWrapper
- Implements
- Inherited Members
Constructors
- MongoClientWrapper(IDbContextOptions, IServiceProvider, IDiagnosticsLogger<Command>)
Create a new instance of MongoClientWrapper with the supplied parameters.
Methods
- CreateDatabase(IModel)
Create a new database with the name specified in the connection options.
- CreateDatabaseAsync(IModel, CancellationToken)
Create a new database with the name specified in the connection options asynchronously.
- DatabaseExists()
Determine if the database already exists or not.
- DatabaseExistsAsync(CancellationToken)
Determine if the database already exists or not asynchronously.
- DeleteDatabase()
Delete the database specified in the connection options.
- DeleteDatabaseAsync(CancellationToken)
Delete the database specified in the connection options asynchronously.
- Execute<T>(MongoExecutableQuery, out Action)
Execute a MongoExecutableQuery and return a Action that should be executed once the first item has been enumerated.
- GetCollection<T>(string)
Get an MongoDB.Driver.IMongoCollection<TDocument> for the given
collectionName;
- StartSession()
Start a new client session.
- StartSessionAsync(CancellationToken)
Start a new client session asynchronously.