Database Reference
In-Depth Information
To delete the table, we simply perform Drop on the table, which is a MongoCollec-
tion of objects related to the table itself. MongoDB is not an ORM. It is a document-ori-
ented database, meaning it handles the database as a collection of documents, in this case,
BSON documents (a collection of documents). Think of each document as a row in the
database and each field in the row as a name-value pair:
public static void DeleteMessageMaps()
{
var client = new MongoClient(ConnectionString);
var server = client.GetServer();
MongoDatabase myConfig =
server.GetDatabase("MyConfig");
MongoCollection<MessageEndpointMappingDB>
endpoints =
myConfig.GetCollection<MessageEndpointMappingDB>("MessageEndpointMappingDB");
endpoints.Drop();
}
This was a simple introduction into MongoDB.
Search WWH ::




Custom Search