SummaryCore types for connecting to a remote MongoDB Server RemarksThis namespace defines proxy objects and helper classes to allow a remote connection to a MongoDB Server. In general, you will want to make use of the Mongo class to bind to a server and get IServer , IDatabase , and IDBCollection proxies. These directly correlate with server-side representations of MongoDB objects, and by using local properties and methods, you can interact with the server. Example: Inserting a new document into a collection IDBCollection coll = Mongo.GetDatabase("http://localhost/db").GetCollection("test");
coll.Insert(new Document() { {"a", 1}, {"b", 2}});Example: Querying for documents that match certain criteria IDBCollection coll = Mongo.GetDatabase("http://localhost/db").GetCollection("test");
//Find first document in the collection whose "a" field is 1
coll.FindOne(Where.Field(a => a == 1)); Enumerations
Interfaces
Classes
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
► Sign in to add a comment