Utilities and extensions for Collections includes Collections.Paginable and so on...
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
performance/DotNetCore.Collections.Paginable.Benchmarks
sample
src/DotNetCore.Collections.Paginable
tests/DotNetCore.Collections.Paginable.Tests
.gitignore
DotNetCore.Collections.sln
LICENSE
Publish.bat
README.md

README.md

Collections

NuGet Member project of .NET Core Community GitHub license FOSSA Status

Utilities and extensions for Collections.

Install

for Paginable:

Install-Package DotNetCore.Collections.Paginable

Usage

Example for Paginable x EFCore

Example for Paginable x EF

var list = Enumerable.Range(0, 10000);

var paginableList = list.ToPaginable(50);   //Get a collection of Page, each page has 50 PageMembers
var page = paginableList.GetPage(15);       //Get page 15th

for (var i = 0; i < page.CurrentPageSize; i++)
{
    Console.Write($"{page[i].ItemNumber}:{page[i].Value}   ");
    if (i % 10 == 9)
    {
        Console.WriteLine();
    }
}

or

var list = Enumerable.Range(0, 10000);

var page = list.GetPage(15, 50);

for (var i = 0; i < page.CurrentPageSize; i++)
{
    Console.Write($"{page[i].ItemNumber}:{page[i].Value}   ");
    if (i % 10 == 9)
    {
        Console.WriteLine();
    }
}

Member project of .NET China Foundation

License

FOSSA Status