Anand Dayalan
Anand Dayalan

Reputation: 513

In Mongo DB how do I execute the following statement in C#?

In Mongo DB how do I execute the following statement in C#? The C# driver is not converting Linq into aggregation framework, so I can't use linq. If I use linq it reads all the data from the DB and groups in the application level and which is not making use of New MongoDB aggregation framework. Looks like CommandDocument may be used but I don't find any documentation for that and not sure how to use it.

db.orders.aggregate([ 
 { $group: {_id:"$cust_id",total:{$sum:"$price"}} } 
])

Upvotes: 1

Views: 767

Answers (1)

Robert Stam
Robert Stam

Reputation: 12187

See the answer to the same question that was posted here:

https://groups.google.com/forum/?fromgroups#!topic/mongodb-user/8dM1LnHh9-Q

Upvotes: 1

Related Questions