Support aggregation for OData


Closed Jan 15, 2015 at 7:33 AM by lianw
Closed here and moved the issue to GitHub (https://github.com/OData/WebApi/issues/70)


nlips wrote Oct 12, 2014 at 1:16 PM

An alternative to some OData aggregation scenarios is to use the server-side extension method QueryByCube provided by my product AdaptiveLINQ.
This function is based on the notion of cube defined as C# expressions.
Grouping and aggregation is performed according to the selection expressed via the $select operator.

For example, the following query provides the total sales per customer:
.../myService?$select=Customer, Sales
The request is processed by AdaptiveLINQ as a query using the GroupBy operator on a (potentially) complex entity model.
The advantage vs a grouping expression expressed client side, is that the developer of the service, control the dimensions of aggregation can therefore optimize his data system (index on some data table fields...). Moreover, the client does not have to know the complexity of calculating aggregations.