I want to simply execute pure MongoDB queries via MongoDb 10Gen's .net(c#) driver.
For example . I want to use below command on driver
db.people.update( { name:"Joe" }, { $inc: { n : 1 } } );
I am not sure how can i do this. I am not interested in how to do via high level api classes.
The C# driver (or any other driver) is not intended to "directly" run mongo shell commands. That's what the shell is for. What you need to do is translate the mongo shell commands into the equivalent C# statements.
If you want to run mongo shell commands then run them in the mongo shell.
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