ExicoPaginationCore 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ExicoPaginationCore --version 1.0.0                
NuGet\Install-Package ExicoPaginationCore -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ExicoPaginationCore" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ExicoPaginationCore --version 1.0.0                
#r "nuget: ExicoPaginationCore, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ExicoPaginationCore as a Cake Addin
#addin nuget:?package=ExicoPaginationCore&version=1.0.0

// Install ExicoPaginationCore as a Cake Tool
#tool nuget:?package=ExicoPaginationCore&version=1.0.0                

ExicoPaginationCore

A pagination for aspnet core applications. Easily create paginations for your tabular/list data display pages. By default the styling is done assuming that you are using bootstrap. But everything can be overridden and customized.

How to use

  1. In your Startup.cs add the pagination

    public void ConfigureServices(IServiceCollection services)
    {
     services.AddExicoCorePagination();
    }
    
  2. Now import the namespace in your _ViewImports.cshtml by adding this following line

    @using ExicoPaginationCore

  3. Then in your view file use this extension method to render pagination

    @Html.RenderPagination()

    This method takes three parameters i.e.

    @Html.RenderPagination((int)ViewBag.TotalCount, (int)ViewBag.ItemsPerPage, config)
    
    1. Total result count

    2. Items per page

    3. And lastly IPagingConfig instance

      Note that, IPagingConfig can be injected and directly used (as the example above is using)

      @inject IPagingConfig config

      This config object is an instance of the DefaultPaginationConfig (uses bootstrap 4).

      You can also create and object of DefaultPaginationConfig , customize it and pass it as param.

      @Html.RenderPagination((int)ViewBag.TotalCount,(int)ViewBag.ItemsPerPage, new DefaultPaginationConfig()
      {
      HideNextOnLastPage = true,
      HidePrevOnFirstPage = true
      });
      

      or you can create an entirely new implementation of IPagingConfig and replace the default service registration.

There is a fully working demo project included , check it out TestApplication.csproj !

screenshot

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 796 3/11/2019
1.0.0 699 2/5/2019