SummaryResult
SummaryResult is the return shape of ToListSummary and ToListAsyncSummary. It mirrors FilterResult<T> except Data is a list of dynamic objects whose properties are the GroupBy.Fields plus every AggregateBy.Alias.
Properties
| Property | Type | Description |
|---|---|---|
PageNumber | int | Current page (0 when no pagination). |
PageSize | int | Page size (0 when no pagination). |
PageCount | int | Total pages. |
TotalCount | int | Total grouped records. |
Data | List<dynamic> | Dynamic objects with group keys + aggregation values. |
QueryString | string? | Generated SQL (when getQueryString: true is passed). |
Flattened alias keys
Each row in
Data is a dynamic object whose top-level properties are the GroupBy.Fields names plus the AggregateBy.Alias names. There is no nesting under "group" / "aggregates" — everything is flat.C# usage
SummaryResult result = await dbContext.Orders.ToListAsync(summary);
foreach (dynamic row in result.Data)
{
Console.WriteLine($"{row.Country}: {row.Total} orders, revenue {row.Revenue}");
}JSON response example
Given a Summary grouping by Country with aliases Total (Count) and Revenue (Sum of Amount):
{
"pageNumber": 1,
"pageSize": 20,
"pageCount": 1,
"totalCount": 3,
"data": [
{ "Country": "IQ", "Total": 142, "Revenue": 28450.75 },
{ "Country": "SA", "Total": 98, "Revenue": 19120.00 },
{ "Country": "AE", "Total": 31, "Revenue": 6940.50 }
],
"queryString": null
}See also
- Summary →
- GroupBy →
- AggregateBy → defines the alias keys you see here.
- ToListAsyncSummary →