Table of Contents

Class MongoDatabaseCreator

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

Placeholder for a MongoDB IDatabaseCreator that is a required dependency of the MongoTransactionManager placeholder.

public class MongoDatabaseCreator : IDatabaseCreator
Inheritance
MongoDatabaseCreator
Implements
Inherited Members

Methods

CanConnect()

Determines whether or not the database is available and can be connected to.

CanConnectAsync(CancellationToken)

Determines whether or not the database is available and can be connected to.

EnsureCreated()

Ensures that the database for the context exists. If it exists, no action is taken. If it does not exist then the database and all its schema are created. If the database exists, then no effort is made to ensure it is compatible with the model for this context.

EnsureCreatedAsync(CancellationToken)

Asynchronously ensures that the database for the context exists. If it exists, no action is taken. If it does not exist then the database and all its schema are created. If the database exists, then no effort is made to ensure it is compatible with the model for this context.

EnsureDeleted()

Ensures that the database for the context does not exist. If it does not exist, no action is taken. If it does exist then the database is deleted.

Warning: The entire database is deleted an no effort is made to remove just the database objects that are used by the model for this context.

EnsureDeletedAsync(CancellationToken)

Asynchronously ensures that the database for the context does not exist. If it does not exist, no action is taken. If it does exist then the database is deleted.

Warning: The entire database is deleted an no effort is made to remove just the database objects that are used by the model for this context.