Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "_id" : 1,
- "UserName" : "1",
- "Description" : "abc",
- "UserCode" : "abc",
- "Email" : "abc@gmail.com",
- "PhoneNo" : 123,
- "Address" : null,
- "Locations" : [ ]
- }
- var aggregate = collection.Aggregate().Group(new BsonDocument { { "_id", "$_id" }, { "count", new BsonDocument("$sum", 1) } });
- var results = aggregate.ToList();
Add Comment
Please, Sign In to add comment