TAG: mongodb

Software Engineer. Stuff and nonsense. The usually short ramblings of Chris McKee.

Handy MongoDB C# Tools

Just a few bits and bobs I've collected up lately. Aggregation is a neat feature in MongoDB and as with most mongo c# stuff it's often a small hurdle to implementing the same query you perform in BSON in the driver language… Sooo just to get you started https://chrismckee.co.uk/mongo-aggregation-in-c/ Quite a good idea to mix this with Profiling so you can watch how it's querying etc... Pipeline Requests I like the…

Simple MongoDB Aggregation in C#

Grouping Data with Count Note: This starts with the 1.10.1 version of the mongo driver; https://www.nuget.org/packages/mongocsharpdriver/1.10.1 the v2 driver wraps the Async methods to syncronous to stay 'compatible' and as such is slower. So running 'synchronous' using v2 would be disadvantaged by the new driver while async with the async driver may have a minor benefit. The async is covered further down using Driver 2.1.…