Repository navigation
Data Models Reference
This page is the field-by-field reference for the request and response models exposed by the PagedListResult.DataModels package (assembly RzR.ResultMessage.Pagination.Abstractions). Every other layer of the library, from the EF Core extensions to the ASP.NET Core binders, is built on top of these shapes.
All types live under RzR.ResultMessage.Pagination.Abstractions.*. The package targets netstandard2.0 and has no runtime dependencies beyond the standard library and RzR.ResultMessage.
The base request used by every paginated endpoint.
| Property | Type | Default | Description |
|---|---|---|---|
Page |
int |
1 |
1-based page index. Validated by [Range(1, int.MaxValue)]. |
PageSize |
int |
10 |
Number of items per page. Validated by [Range(1, int.MaxValue)]. The Web layer additionally caps it by MaxPageSize. |
Search |
DataSearchDefinition |
new instance | Free-text search settings. See below. |
Order |
DataOrderDefinition |
new instance | Sorting settings. See below. |
Fields |
ICollection<string> |
empty HashSet
|
Optional list of property names to project; the library will reduce the response payload to those fields (handy for stored-procedure projections and column toggles). |
PredefinedRecord |
DataPredefinedFilterDefinition |
new instance | Identifiers of records to be pinned at the top of the result. |
All members are virtual, so you can derive your own request type and override defaults or add custom annotations.
Extends PagedRequest and adds the filter pipeline. Implements IValidatableObject, which means MVC will surface model-level validation errors automatically when filters are malformed.
| Property | Type | Default | Description |
|---|---|---|---|
Filters |
ICollection<DataFilter> |
empty HashSet
|
Top-level filter expressions. The behavior of the collection depends on which GetPagedWith* overload is called; see EntityFramework Core Extensions. |
A single filter entry. Implements IValidatableObject.
| Property | Type | Description |
|---|---|---|
FilterValue |
DataFilterValue |
Required. The actual condition (property + operator + value). |
FilterApplyOrder |
int |
Required. Determines the order in which filters are applied. Lower values are applied first. |
Dependencies |
ICollection<DataFilterDependence> |
Optional. Sub-conditions linked to the parent via AND/OR (only used by GetPagedWithFiltersAsync). |
Describes the condition itself. Implements IValidatableObject.
| Property | Type | Description |
|---|---|---|
Condition |
FilterType |
The operator. Defaults to Equals. |
PropertyName |
string |
Required. The property to filter on. |
Values |
ICollection<string> |
Required for most conditions. For IsIn/IsNotIn all entries are used; for Between the first entry is the lower bound; for IsNull/IsNotNull the collection is ignored. |
CompareValue |
string |
Used as the upper bound by Between. |
Validation rules enforced by Validate(...):
-
PropertyNamemust be present. -
Conditionmust be set. -
BetweenrequiresCompareValue. - Conditions other than
IsNull/IsNotNullrequire at least one value. - Multiple
Valuesare only valid forIsInandIsNotIn.
A child condition attached to a parent DataFilter.
| Property | Type | Description |
|---|---|---|
ParentFilterLinkType |
FilterConditionType |
And or Or. Determines how this dependency combines with the parent. |
FilterValue |
DataFilterValue |
The dependency's condition. |
| Property | Type | Default | Description |
|---|---|---|---|
OrderByProperty |
string |
null |
Property name to order by. |
OrderDirection |
OrderDirection |
Asc |
Asc or Desc. |
OrderByDefaultProperty |
bool |
false |
If true and OrderByProperty is empty, the library looks for a property decorated with [PaginationDefaultOrderProperty] and orders by it. If neither is present, the query is left in its natural order (the EF Core extensions append OrderBy(_ => 0) to keep Skip/Take deterministic). |
| Property | Type | Default | Description |
|---|---|---|---|
Search |
string |
null |
The free-text search term. Empty/null means "no search". |
SearchInAllTextFields |
bool |
true |
When true, the term is matched against every string property of the entity. |
SearchInAllFields |
bool |
false |
When true, the search engine is allowed to attempt matching across all properties (including non-string ones). Mutually exclusive with SearchInAllTextFields semantically; the Web binder uses `searchAll=true |
CustomSearchTextProperties |
ICollection<string> |
empty | When neither "all text" nor "all" mode is set, the search is restricted to this list. |
Convenience method SetCustomSearchProperties(IEnumerable<string>) clears SearchInAllTextFields and assigns the list in one call.
| Property | Type | Description |
|---|---|---|
PredefinedFieldName |
string |
Property to match against. If empty, the library falls back to the property decorated with [PaginationDefaultTopRecordPrimaryKey] or to the entity's primary key (resolved through DefaultPrimaryKeyDefinition). |
PredefinedRecords |
ICollection<string> |
Identifiers (string-encoded) of the rows to pin at the top of the result. |
Breaking change history: in v3 the property was renamed from
PredefinedRecords(a flat collection onPagedRequest) toPredefinedRecord(an object with two members). See Migration Guide.
Helper passed to GetPaged* to tell the predefined-records pipeline which property carries the entity key.
| Property | Type | Description |
|---|---|---|
DefaultPrimaryKey |
string |
Property name to use when PredefinedFieldName is missing. |
FindByAttribute |
bool |
If true, the resolver will look up the property decorated with [PaginationDefaultTopRecordPrimaryKey]. |
FindByEntity |
bool |
If true, the resolver will probe the EF Core model and use the entity's primary key. |
Constructors: parameterless, single-string, and full triple (string, bool, bool).
Generic envelope returned by every paged operation. It extends Result<IList<TSource>> from RzR.ResultMessage and implements IPagedResult<TSource>.
| Property | Type | Description |
|---|---|---|
CurrentPage |
int |
1-based current page. |
PageCount |
int |
Total number of pages. |
PageSize |
int |
Page size used to compute the slice. |
RowCount |
int |
Total filtered rows (before paging). |
HasPreviousPage |
bool |
Derived (defaults to CurrentPage > 1). Setter is intentionally idempotent: it only stores an explicit override when it disagrees with the derived value. |
HasNextPage |
bool |
Derived (defaults to CurrentPage < PageCount). Same idempotency rule as above. |
Response |
IList<TSource> |
The actual page items. Annotated with [XmlArray] for SOAP/XML serialization. |
ExecutionDetails |
PagedExecDetailsResult |
Wall-clock execution metadata. |
IsSuccess |
bool |
Inherited from Result<T>. The library sets it to true after building the response. |
Messages |
IList<MessageModel> |
Inherited from Result<T>. Filled with validation/error messages on failure. |
The class also exposes Map<TDestination>(IEnumerable<TDestination>), which clones the envelope but swaps the response items. Useful when the database query returned entities and you want to project to a DTO without losing the paging metadata.
| Property | Type | Description |
|---|---|---|
ExecutionTimeMs |
long |
Elapsed milliseconds. -1 means "not measured". |
ExecutionDate |
DateTime? |
Server-side timestamp captured when the response was built. |
The setters are private. Use SetExecutionTimeMs(long, DateTime) if you need to amend the values from custom decorators. The Web layer reads ExecutionTimeMs to populate the optional Server-Timing: paged;dur=<ms> header.
Lightweight contract you should rely on in interfaces and method signatures (preferred over the concrete PagedResult<T> to make testing and mocking easier). Members mirror the concrete class.
public interface IPagedResult<TSource> : IResult<IList<TSource>>
where TSource : class
{
int CurrentPage { get; set; }
int PageCount { get; set; }
int PageSize { get; set; }
int RowCount { get; set; }
bool HasPreviousPage { get; set; }
bool HasNextPage { get; set; }
PagedExecDetailsResult ExecutionDetails { get; set; }
}Located in RzR.ResultMessage.Pagination.Abstractions.Enums. The numeric values are the declaration order (default integer enum).
| Member | Notes |
|---|---|
Equals |
Property == value. |
NotEquals |
Property != value. |
StartsWith |
Case-insensitive string.StartsWith. |
DoesNotStartWith |
Negated StartsWith. |
EndsWith |
Case-insensitive string.EndsWith. |
DoesNotEndsWith |
Negated EndsWith. |
Contains |
Case-insensitive string.Contains. |
SensitiveContains |
Case-sensitive Contains. |
DoesNotContains |
Case-insensitive negated Contains. |
SensitiveDoesNotContains |
Case-sensitive negated Contains. |
GreaterThan |
>. |
GreaterThanOrEquals |
>=. |
LessThan |
<. |
LessThanOrEquals |
<=. |
Between |
Two-bound inclusive range; uses Values[0] and CompareValue. |
IsIn |
Multi-value Contains (set membership). |
IsNotIn |
Multi-value negated Contains. |
IsNull |
Value-less; checks for null. |
IsNotNull |
Value-less; checks for non-null. |
public enum FilterConditionType { And, Or }Used for filterLink (between top-level filters) and for DataFilterDependence.ParentFilterLinkType.
public enum OrderDirection { Asc, Desc }The model serializes to a fully self-describing JSON shape. The same payload is produced regardless of the target framework.
{
"currentPage": 1,
"pageCount": 0,
"pageSize": 10,
"rowCount": 0,
"executionDetails": {
"executionTimeMs": 0,
"executionDate": "yyyy-MM-ddTHH:mm:ss.fff"
},
"response": [],
"isSuccess": true,
"messages": []
}PagedListResult is maintained by RzR. GitHub repository.
Start here
Reference
- Data Models Reference
- Expression Builders (Common)
- EntityFramework Core Extensions
- Query String Syntax
ASP.NET Core integration
- Web Integration Overview
- MVC Integration
- Minimal API Integration
- Configuration and Options
- Allow List Registry
- Response Headers and ProblemDetails
- OpenAPI and ApiExplorer
Operations
{ "page": 1, "pageSize": 10, "search": { "search": "string", "searchInAllTextFields": true, "searchInAllFields": false, "customSearchTextProperties": [ "string" ] }, "order": { "orderByProperty": "string", "orderDirection": 0, "orderByDefaultProperty": false }, "fields": [ "string" ], "predefinedRecord": { "predefinedFieldName": "string", "predefinedRecords": [ "string" ] }, "filters": [ { "filterValue": { "condition": 0, "propertyName": "string", "values": [ "string" ], "compareValue": "string" }, "filterApplyOrder": 0, "dependencies": [ { "parentFilterLinkType": 0, "filterValue": { "condition": 0, "propertyName": "string", "values": [ "string" ], "compareValue": "string" } } ] } ] }