This class handles some connection and Configuration tasks for Mongo globally.
public class MongoDbContext : object
Member | Description | |
---|---|---|
![]() |
Constructor | |
![]() |
GetDatabase | Creates a connection to a databaseName based on the Databasename and optional server connection string. public virtual MongoDatabase GetDatabase(string connectionString,
string databaseName); |
![]() |
SetConventions | Sets MongoDb global Conventions public virtual void SetConventions(IEnumerable<IConvention> conventions);
|
![]() |
ConnectionString | A full connection string to a MongoDb server Optionally include the database name as a path |
![]() |
DatabaseName | The name of the database to access if not specified on the connectionstring path. |