Is there a way to submit a query that is expressed in the shell query syntax to the mongo c# driver
For example Something like
Coll.find { \"myrecs\"
Using the official C# driver, you'd do something like this:
var server = MongoServer.Create("mongodb://localhost:27017");
var db = server.GetDatabase("mydb");
var col = db.GetCollection("col");
var query = Query.And(Query.EQ("x", 3), Query.EQ("y", "abc"));
var resultsCursor = col.Find(query).SetSortOrder("x");
var results = resultsCursor.ToList();
The equivalent query from the shell would be:
col.find({ x: 3, y: "abc" }).sort({ x: 1 })