How hesamkashefi/paginationhelper works
PaginationHelper is a .NET API pagination library. An API caller supplies an ordered query or enumerable and page parameters to IPageHelper; PageHelper selects a page, optionally projects records, counts the total, and returns an envelope with paging metadata and navigation links. The library also provides dependency-injection setup and configurable defaults. The README documents the caller workflow; sampled implementation shows the helper’s internal behavior. External framework and mapping dependencies are shown only where their use is explicit.
Main entry points: PageHelper.cs Page Helper · Pagination.cs Navigation Links · Meta.cs Response Metadata · IPageHelper.cs Helper Contract
Components 13
API Integration
- Service Registration
PaginationHelper/PaginationHelperExtensions.cs - Helper Contract
PaginationHelper/IPageHelper.cs
Pagination Processing
- Page Parameters
PaginationHelper.Core/PaginationDto.cs - Page Helper
PaginationHelper/PageHelper.cs - Page Configuration
PaginationHelper.Core/PageConfig.cs
Response Model
- Page Statistics
PaginationHelper.Core/Pager.cs - Navigation Links
PaginationHelper.Core/Pagination.cs - Response Metadata
PaginationHelper.Core/Meta.cs - Response Envelope
PaginationHelper.Core/Envelope{T}.cs
Other components
- API Caller
- Ordered Data
- AutoMapper
- ASP.NET URL Services
Connections 18
- API Caller → Helper Contract: calls
README.md - API Caller → Ordered Data: supplies query
README.md - API Caller → Page Parameters: supplies parameters
README.md - Service Registration → Helper Contract: registers
PaginationHelper/PaginationHelperExtensions.cs - Service Registration → Page Helper: registers implementation
PaginationHelper/PaginationHelperExtensions.cs - Page Helper → Helper Contract: implements
PaginationHelper/PageHelper.cs - Page Helper → Page Parameters: reads
PaginationHelper/PageHelper.cs - Page Helper → Page Configuration: uses defaults
PaginationHelper/PageHelper.cs - Page Helper → Ordered Data: pages and counts
PaginationHelper/PageHelper.cs - Page Helper → AutoMapper: projects records
PaginationHelper/PageHelper.cs - Page Helper → ASP.NET URL Services: builds links
PaginationHelper/PageHelper.cs - Page Helper → Page Statistics: computes statistics
PaginationHelper/PageHelper.cs - Page Helper → Navigation Links: creates links
PaginationHelper/PageHelper.cs - Page Helper → Response Metadata: builds metadata
PaginationHelper/PageHelper.cs - Page Helper → Response Envelope: returns envelope
PaginationHelper/PageHelper.cs - Page Statistics → Navigation Links: provides page counts
PaginationHelper/PageHelper.cs - Navigation Links → Response Metadata: populates links
PaginationHelper/PageHelper.cs - Response Metadata → Response Envelope: included in
PaginationHelper.Core/Envelope{T}.cs