This library is available on NuGet: https://www.nuget.org/packages/Paging.NET/ Use the following command to install Paging using NuGet package manager console:
PM> Install-Package Paging.NET
You can use this library in any .Net project which is compatible to .Net Standard 1.0 and higher as well as with legacy PCL projects.
Paging.NET | Paging.Forms.NET | Paging.Queryable.NET | |
---|---|---|---|
Version | |||
Pre-Release | |||
Downloads |
Paging or pagination is a process of slicing a certain (usually big and costly) collection into subsets of items in order to improve query performance. Paging is not only a matter of splitting collections into chunks, it also has to consider sorting and filtering. Paging involves the requesting client in specifying a paging request and the responding service to respond with a result set.
In Paging.NET, each paging request is specified in a PagingInfo
. The resulting page is returned in a PaginationSet
.
PagingInfo
allows to define which page index we want to retrieve (CurrentPage
), how many items each page shall contain (ItemsPerPage
), how the collection is sorted before it is paged (SortBy
resp.Sorting
) and if we like to apply a filter (Search
resp.Filter
) on the target collection.PaginationSet
sends the subset ofItems
along with some meta information, like the current page's zero-based indexCurrentPage
, the total number of pagesTotalPages
, the total number of itemsTotalCount
(unfiltered:TotalCountUnfiltered
).
TODO: Document the usage of PagingInfo and PaginationSet in some concrete examples
Contributors welcome! If you find a bug or you want to propose a new feature, feel free to do so by opening a new issue on github.com.
This project is Copyright © 2019 Thomas Galliker. Free for non-commercial use. For commercial use please contact the author.