Maars.Sorting
1.1.0
dotnet add package Maars.Sorting --version 1.1.0
NuGet\Install-Package Maars.Sorting -Version 1.1.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="Maars.Sorting" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Maars.Sorting --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Maars.Sorting, 1.1.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 Maars.Sorting as a Cake Addin
#addin nuget:?package=Maars.Sorting&version=1.1.0
// Install Maars.Sorting as a Cake Tool
#tool nuget:?package=Maars.Sorting&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
sorting
Sorting package for .net core application to do auto sorting columns on SQL/Any Queriers from Entity framework
Sorting any fields
format query string in the format of
http://localhost/products?sort=name_asc;code_dsc
Setup in .net core Starupt
services.AddMvc(config =>
{
config.Filters.Add(typeof(PaginationFilter));
config.Filters.Add(typeof(SortingFilter));
});
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.Sorting;
public override IEnumerable<Standard> GetList(PaginationParams paginationParams, SortingInfo sortingInfo)
{
var query = Context.Standard.GetList(paginationParams).IncludeOrderBy(sortingInfo)
.AsNoTracking();
return query;
}
If you need additonal default filter Add it with parameter
public override IEnumerable<Standard> GetList(PaginationParams paginationParams, SortingInfo sortingInfo)
{
sortingInfo.Add(nameof(Standard.Code), Sorting.Asc);
var query = Context.Standard.GetList(paginationParams).IncludeOrderBy(sortingInfo)
.AsNoTracking();
return query;
}
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.1.0 | 1,154 | 3/11/2018 |