/* * $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); }
public CommandResult Aggregate(AggregationBuilder b) { var result = context.Collection.Database.RunCommand(b.Build()); return(result); }