mirror of
https://github.com/Biarity/Sieve.git
synced 2024-11-21 21:12:50 +01:00
Filters & Sorts instead of Filter & Sort. Updated nuspec
This commit is contained in:
parent
b75b6f47c6
commit
85b657965a
@ -15,8 +15,8 @@ namespace Sieve.Models
|
|||||||
|
|
||||||
int? PageSize { get; set; }
|
int? PageSize { get; set; }
|
||||||
|
|
||||||
List<FilterTerm> FilterParsed { get; }
|
List<FilterTerm> FiltersParsed { get; }
|
||||||
|
|
||||||
List<SortTerm> SortParsed { get; }
|
List<SortTerm> SortsParsed { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ namespace Sieve.Models
|
|||||||
public int? PageSize { get; set; }
|
public int? PageSize { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public List<FilterTerm> FilterParsed
|
public List<FilterTerm> FiltersParsed
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@ -38,7 +38,7 @@ namespace Sieve.Models
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<SortTerm> SortParsed
|
public List<SortTerm> SortsParsed
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -83,11 +83,11 @@ namespace Sieve.Services
|
|||||||
|
|
||||||
public IQueryable<TEntity> ApplySorting(ISieveModel model, IQueryable<TEntity> result)
|
public IQueryable<TEntity> ApplySorting(ISieveModel model, IQueryable<TEntity> result)
|
||||||
{
|
{
|
||||||
if (model?.SortParsed == null)
|
if (model?.SortsParsed == null)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
var useThenBy = false;
|
var useThenBy = false;
|
||||||
foreach (var sortTerm in model.SortParsed)
|
foreach (var sortTerm in model.SortsParsed)
|
||||||
{
|
{
|
||||||
var property = GetSieveProperty(true, false, sortTerm.Name);
|
var property = GetSieveProperty(true, false, sortTerm.Name);
|
||||||
|
|
||||||
@ -113,10 +113,10 @@ namespace Sieve.Services
|
|||||||
|
|
||||||
public IQueryable<TEntity> ApplyFiltering(ISieveModel model, IQueryable<TEntity> result)
|
public IQueryable<TEntity> ApplyFiltering(ISieveModel model, IQueryable<TEntity> result)
|
||||||
{
|
{
|
||||||
if (model?.FilterParsed == null)
|
if (model?.FiltersParsed == null)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
foreach (var filterTerm in model.FilterParsed)
|
foreach (var filterTerm in model.FiltersParsed)
|
||||||
{
|
{
|
||||||
var property = GetSieveProperty(false, true, filterTerm.Name);
|
var property = GetSieveProperty(false, true, filterTerm.Name);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>Sieve</id>
|
<id>Sieve</id>
|
||||||
<version>1.2</version>
|
<version>1.3.1</version>
|
||||||
<title>Sieve</title>
|
<title>Sieve</title>
|
||||||
<authors>Biarity</authors>
|
<authors>Biarity</authors>
|
||||||
<owners>Biarity</owners>
|
<owners>Biarity</owners>
|
||||||
@ -10,8 +10,10 @@
|
|||||||
<projectUrl>https://github.com/Biarity/Sieve</projectUrl>
|
<projectUrl>https://github.com/Biarity/Sieve</projectUrl>
|
||||||
<iconUrl>https://emojipedia-us.s3.amazonaws.com/thumbs/240/emoji-one/104/control-knobs_1f39b.png</iconUrl>
|
<iconUrl>https://emojipedia-us.s3.amazonaws.com/thumbs/240/emoji-one/104/control-knobs_1f39b.png</iconUrl>
|
||||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||||
<description>Sieve is a simple, clean, and extensible framework for .NET Core that adds sorting, filtering, and pagination functionality out of the box. Most common use case would be for serving ASP.NET Core GET queries.</description>
|
<description>
|
||||||
<releaseNotes>Summary of changes made in this release of the package.</releaseNotes>
|
Sieve is a simple, clean, and extensible framework for .NET Core that adds sorting, filtering, and pagination functionality out of the box. Most common use case would be for serving ASP.NET Core GET queries. Documentation available on GitHub: https://github.com/Biarity/Sieve/
|
||||||
|
</description>
|
||||||
|
<releaseNotes>Added inequality supprort</releaseNotes>
|
||||||
<copyright>Copyright 2018</copyright>
|
<copyright>Copyright 2018</copyright>
|
||||||
<tags>aspnetcore filter sort page paginate sieve search</tags>
|
<tags>aspnetcore filter sort page paginate sieve search</tags>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
Loading…
Reference in New Issue
Block a user