Skip to content

Releases: BitzArt/Pagination

Pagination v1.17

09 Mar 15:35
11d5b58
Compare
Choose a tag to compare

What's Changed

Extracted interface IPageRequest for additional versatility - the package now allows custom pagination schemes (e.g. Offset+Limit, PageNumber+PageSize, Cursor-based, etc.) and no longer enforces the default implementation of PageRequest class.

Custom pagination schemes can be accomplished by implementing IPageRequest interface and passing the resulting object to ToPage/ToPageAsync method.

Since the default PageRequest class is no longer enforced, deserialization of the resulting PageResult should be done something like the following:

var myDeserializedPageResult = JsonSerializer.Deserialize<PageResult<T, MyPageRequest>>(myJson);
// where MyPageRequest is your PageRequest implementation

If TRequest is not specified when deserializing (or any other operation for that matter), the default PageRequest class will be used.

Full Changelog: Pagination-v1.16.1...Pagination-v1.17.0