FilterResult<T>
FilterResult<T> is the strongly-typed wrapper returned by every terminal filter extension — ToListFilter, ToListAsyncFilter, and the dynamic variants. It contains the result page plus pagination metadata.
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 matching records. |
Data | List<T> | The result entities. |
QueryString | string? | Generated SQL (when getQueryString: true is passed to the extension). |
Note
When the input
Filter has no Page, PageNumber and PageSize come back as 0, and PageCount is 1 with the full result in Data.C# usage
FilterResult<Customer> result = await dbContext.Customers.ToListAsync(filter);
Console.WriteLine($"page {result.PageNumber} of {result.PageCount}");
Console.WriteLine($"{result.TotalCount} total matches");
foreach (var customer in result.Data)
{
Console.WriteLine($"- {customer.Name}");
}JSON response example
{
"pageNumber": 1,
"pageSize": 10,
"pageCount": 5,
"totalCount": 42,
"data": [
{ "id": 7, "name": "John Doe", "createdAt": "2025-09-14T12:31:00Z" },
{ "id": 8, "name": "Jane Roe", "createdAt": "2025-09-13T08:11:00Z" }
],
"queryString": null
}See also
- Filter →
- ToListAsyncFilter →
- SegmentResult<T> → inherits this shape.