I would like to connect to the database specified in the connection string, without specifying it again in GetDatabase.
GetDatabase
For example, if I have a connec
The answer below is apparently obsolete now, but works with older drivers. See comments.
If you have the connection string you could also use MongoDatabase directly:
var db = MongoDatabase.Create(connectionString); var coll = db.GetCollection("MyCollection");