The entities of TSource grouped by a key of type TKey, which Select turns into results.
Object
Namespace: Radzen
Assembly: Radzen.Blazor.dll
public sealed class GroupedODataQuery<TSource, TKey>| Name | Description |
|---|---|
| TSource | The entity type of the entity set. |
| TKey | The type of the group key. |
Sets the result of each group, translated to groupby((keys),aggregate(...)). The selector creates a new result and assigns g.Key or the members of a composite key to members of the same names, and the aggregates g.Sum(x => ...), g.Min(x => ...), g.Max(x => ...), g.Average(x => ...), g.Count() and g.Select(x => ...).Distinct().Count() to any members. An aggregated value can be an expression, e.g. g.Sum(x => x.UnitPrice * x.Quantity * (1 - x.Discount)), and a conversion to another numeric type in it, e.g. g.Sum(x => (int)x.Quantity), is sent as cast(Quantity,Edm.Int32).
public ODataQuery<TSource, TResult> Select(Expressions.Expression<Func<IGrouping<TKey, TSource>, TResult>> selector)
| Type | Name | Description |
|---|---|---|
| Expressions.Expression<Func<IGrouping<TKey, TSource>, TResult>> | selector | The result, e.g. g => new LicenseTotal { Currency = g.Key, TotalPrice = g.Sum(license => license.Price) }. |
| Type | Description |
|---|---|
| ODataQuery<TSource, TResult> | A query of the results. |