PaginableCollections is a set of abstractions and extensions used to provide developers with a consistent way to paginate their data across all .NET (and .NET Core) application stacks.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
images
samples
src/PaginableCollections
tests/PaginableCollections.Tests
tools
.gitattributes
.gitignore
CODE_OF_CONDUCT.md
LICENSE
PaginableCollections.sln
README.md
appveyor.yml
build.cake
build.ps1
build.sh
global.json

README.md

PaginableCollections

Build status NuGet NuGet CodeFactor

A light weight pagination framework for .NET and .NET Core.

something something something

Installing PaginableCollections

You should install PaginableCollections with NuGet:

Install-Package PaginableCollections

This command will download and install PaginableCollections. Let me know if you have questions!

TD;DR

var numbers = new int[] { 2, 4, 5, 1, 6, 8, 2, 0, 4, 3, 4, 1, 5, 9, 7, 0, 2, 4, 8, 9 };

var pageNumber = 2;
var itemCountPerPage = 6;

var paginable = numbers.ToPaginable(pageNumber, itemCountPerPage);

foreach(var t in paginable)
{
    Console.WriteLine($"{t.ItemNumber}, {t.Item}");
}

//output
1, 2
2, 0
3, 4
4, 3
5, 4 
6, 1