Posts

Showing posts from May, 2017

mongoDB Aggregations: Query and Make developers' life easier...

Image
When working with mongoDB aggregations, there will be some situations that you have to write lengthy and complex aggregations. As an example I wrote following aggregation: Which is bit complex, lengthy and time consumed to write. And when this convert to C# it is another time consuming task. The above Aggregation query was write in C# as bellow: As you can see it is very lengthy. So what is the problem now ? Problem...  Think there is a requirement to modify this query to get some other data, or what if there is a bug ? Debugging and modifying this type of code is really gives you a headache; if you DON'T HAVE the mongoDB Aggregation query script saved! If you don't have the script saved you have to convert the C# query to mongoDB Aggregation which is can do but which consumes too much time ! Solution In order to save time and make life easier save the query when you write this kind of complex query follow the easy steps bellow: 1. Save your query I...