Performs multiple aggregations dynamically, returning a queryable collection of dynamic objects which properties defined by the members list, along with new properties computed using aggregateOperation.
public static IQueryable AggregateBy(this IQueryable src, IList<string> members,
IDictionary<string, string> aggregateOperation)| parameter | description |
|---|---|
| src | Source IQueryable |
| members | Names of the properties to keep from initial object type |
| aggregateOperation | Pair of property name and aggregate formula (as defined for System.Linq.Dynamic library) |
Projected IQueryable with item types matching the dynamically constructed type as defined by passed parameters
- class DynamicQueryableExtensions
- namespace Wokhan.Linq.Extensions