I am trying to completely remove a database (delete all collections and the db itself).
When I do it from Robomongo (right click on the db -> drop database) it works as expected, but when using the driver from c# it just removes all collections of the db.
The method I am calling is: MongoDatabase.Drop()
. I am using MongoDB.Driver in .Net 4.5.
Just for sake of completeness, the driver v2.3 has:
var client = new MongoClient(connectionString);
client.DropDatabase(dbName);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With