Exemple #1
0
        /*
         *  $project => Select()
         *  $limit => Take()
         *  $group => GroupBy()
         *  $sort => OrderBy(),OrderByDescending()
         *  $unwind => SelectMany()
         *  $skip => Skip()
         *  $match => Where()
         */

        public AggregationBuilder Add(AggregationBuilder builder)
        {
            this.pipeline.AddRange(builder.pipeline);
            return(this);
        }
Exemple #2
0
        public CommandResult Aggregate(AggregationBuilder b)
        {
            var result = context.Collection.Database.RunCommand(b.Build());

            return(result);
        }