Method GetDatabase
GetDatabase(string)
Gets a MongoDatabase instance representing a database on this server.
public virtual MongoDatabase GetDatabase(string databaseName)
Parameters
databaseName
stringThe name of the database.
Returns
- MongoDatabase
A new or existing instance of MongoDatabase.
GetDatabase(string, WriteConcern)
Gets a MongoDatabase instance representing a database on this server.
public virtual MongoDatabase GetDatabase(string databaseName, WriteConcern writeConcern)
Parameters
databaseName
stringThe name of the database.
writeConcern
WriteConcernThe write concern to use with this database.
Returns
- MongoDatabase
A new or existing instance of MongoDatabase.
GetDatabase(string, MongoDatabaseSettings)
Gets a MongoDatabase instance representing a database on this server.
public virtual MongoDatabase GetDatabase(string databaseName, MongoDatabaseSettings databaseSettings)
Parameters
databaseName
stringThe name of the database.
databaseSettings
MongoDatabaseSettingsThe settings to use with this database.
Returns
- MongoDatabase
A new or existing instance of MongoDatabase.