provide support for mongo db query
i wanted to use linq over a mongo db database but i couldn't find any driver, i found one in codeplex which didn't work as suggested and it wasn't official. It would be really great if a official driver for mongo query is provided as a free feature
-
Anonymous commented
I have had an excellent experience working with MongoDB from LINQPad. Try this:
1. Open Query Properties -> Additional References
Add a reference to the mongocsharpdriver NuGet package( https://www.nuget.org/packages/mongocsharpdriver/1.10.0)
2. Go to Additional Namespace Imports and add a reference to MongoDB.Driver3. Then you can query the database like this:
var server = new MongoClient(new MongoUrl("mongodb://localhost:27017")).GetServer();
var db = server.GetDatabase("myDatabase");
var collection = db.GetCollection("myCollection");
collection.FindAll().Dump();