Skip to content

Use PaginableCollections in AspNetCore! A set of extensions for Microsoft.Extensions.DependencyInjection.

License

Notifications You must be signed in to change notification settings

dataneek/paginable-collections.aspnetcore

Repository files navigation

PaginableCollections.AspNetCore

Build status NuGet NuGet

A light weight pagination framework for .NET and .NET Core - now with additional MVC6 support!

How Do I Use It?

Configure MVC to use PaginableCollections.

public void ConfigureServices(IServiceCollection services)
{
    // important stuff...
    
    services.AddMvc()
        .UsePaginableHeaders(u => u.UseCondensed());
        
    // important stuff...
}

Condensed Headers

Content-Type →application/json; charset=utf-8
Date →Thu, 20 Jul 2017 04:31:01 GMT
Server →Kestrel
Transfer-Encoding →chunked
X-Paginable →{"itemCountPerPage":20,"pageNumber":1,"totalItemCount":14,"totalPageCount":1}

Expanded Headers

Content-Type →application/json; charset=utf-8
Date →Thu, 20 Jul 2017 04:35:13 GMT
Server →Kestrel
Transfer-Encoding →chunked
X-Paginable-ItemCountPerPage →20
X-Paginable-PageNumber →1
X-Paginable-TotalItemCount →14
X-Paginable-TotalPageCount →1

Installing PaginableCollections.AspNetCore

You should install PaginableCollections.AspNetCore with NuGet:

Install-Package PaginableCollections.AspNetCore

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

About

Use PaginableCollections in AspNetCore! A set of extensions for Microsoft.Extensions.DependencyInjection.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published