Maars.Pagination
1.0.3
dotnet add package Maars.Pagination --version 1.0.3
NuGet\Install-Package Maars.Pagination -Version 1.0.3
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="Maars.Pagination" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Maars.Pagination --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Maars.Pagination, 1.0.3"
#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 Maars.Pagination as a Cake Addin
#addin nuget:?package=Maars.Pagination&version=1.0.3
// Install Maars.Pagination as a Cake Tool
#tool nuget:?package=Maars.Pagination&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Pagination
Pagination package for .net core application to do auto pagintation on SQL/Any Queriers from Entity framework
Pagination
Defult Pagination page->1 perPage->25
format query string in the format of
http://localhost/products?perpage=10& page=2
Setup in .net core Starupt
services.AddMvc(config =>
{
config.Filters.Add(typeof(PaginationFilter));
})
Usage on entity framework Decorate controller
[HttpGet]
[SwaggerResponse((int)HttpStatusCode.OK, Type = typeof(IList<Standard>))]
public IActionResult GetStandards([FromQuery] PaginationParams paginationParams,
SortingInfo sortingInfo)
{
var list = Service.GetList(paginationParams, sortingInfo);
return Ok(list);
}
Decorate in Service Ensure Extensions included : using Maars.Pagination.Extensions;
public override IEnumerable<Standard> GetList(PaginationParams paginationParams, SortingInfo sortingInfo)
{
var query = Context.Standard.GetList(paginationParams).IncludeOrderBy(sortingInfo)
.AsNoTracking();
return query;
}
Result in headers
Link →<http://localhost:3991/standards?perpage=10&page=1&per_page=10>; rel="first",<http://localhost:3991/standards?perpage=10&page=1&per_page=10>; rel="prev",<http://localhost:3991/standards?perpage=10&page=1&per_page=10>; rel="last"
X-Page →2 : Current page
X-Per-Page →10 : Per page displayed 10 records
X-Total-Count →7 : Total records in table for the query
X-Total-Pages →1 : Total Pages (TotalRecords/PerPage)
Product | Versions 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.0 is compatible. netcoreapp2.1 was computed. 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.
-
.NETCoreApp 2.0
- Microsoft.ApplicationInsights.AspNetCore (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Abstractions (>= 2.0.2)
- Microsoft.AspNetCore.Mvc.Core (>= 2.0.2)
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.3 | 1,092 | 3/11/2018 |