Table of Contents

Interface IMongoClientWrapper

Namespace
MongoDB.EntityFrameworkCore.Storage
Assembly
MongoDB.EntityFrameworkCore.dll

For internal use only. Interface may change between minor versions. Provides the interface between the MongoDB Entity Framework provider and the underlying MongoDB.Driver.IMongoClient for a given database.

public interface IMongoClientWrapper

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.