From 85b657965a174a65d9e0f44b51bf2d61ca66fe71 Mon Sep 17 00:00:00 2001 From: Biarity Date: Sun, 28 Jan 2018 10:16:24 +1000 Subject: [PATCH] Filters & Sorts instead of Filter & Sort. Updated nuspec --- Sieve/Models/ISieveModel.cs | 4 ++-- Sieve/Models/SieveModel.cs | 4 ++-- Sieve/Services/SieveProcessor.cs | 8 ++++---- Sieve/Sieve.nuspec | 8 +++++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Sieve/Models/ISieveModel.cs b/Sieve/Models/ISieveModel.cs index cba107f..3e1b227 100644 --- a/Sieve/Models/ISieveModel.cs +++ b/Sieve/Models/ISieveModel.cs @@ -15,8 +15,8 @@ namespace Sieve.Models int? PageSize { get; set; } - List FilterParsed { get; } + List FiltersParsed { get; } - List SortParsed { get; } + List SortsParsed { get; } } } diff --git a/Sieve/Models/SieveModel.cs b/Sieve/Models/SieveModel.cs index 026bbdd..306e585 100644 --- a/Sieve/Models/SieveModel.cs +++ b/Sieve/Models/SieveModel.cs @@ -18,7 +18,7 @@ namespace Sieve.Models public int? PageSize { get; set; } - public List FilterParsed + public List FiltersParsed { get { @@ -38,7 +38,7 @@ namespace Sieve.Models } } - public List SortParsed + public List SortsParsed { get { diff --git a/Sieve/Services/SieveProcessor.cs b/Sieve/Services/SieveProcessor.cs index d3c7409..e03787f 100644 --- a/Sieve/Services/SieveProcessor.cs +++ b/Sieve/Services/SieveProcessor.cs @@ -83,11 +83,11 @@ namespace Sieve.Services public IQueryable ApplySorting(ISieveModel model, IQueryable result) { - if (model?.SortParsed == null) + if (model?.SortsParsed == null) return result; var useThenBy = false; - foreach (var sortTerm in model.SortParsed) + foreach (var sortTerm in model.SortsParsed) { var property = GetSieveProperty(true, false, sortTerm.Name); @@ -113,10 +113,10 @@ namespace Sieve.Services public IQueryable ApplyFiltering(ISieveModel model, IQueryable result) { - if (model?.FilterParsed == null) + if (model?.FiltersParsed == null) return result; - foreach (var filterTerm in model.FilterParsed) + foreach (var filterTerm in model.FiltersParsed) { var property = GetSieveProperty(false, true, filterTerm.Name); diff --git a/Sieve/Sieve.nuspec b/Sieve/Sieve.nuspec index 6420c5f..3d8d657 100644 --- a/Sieve/Sieve.nuspec +++ b/Sieve/Sieve.nuspec @@ -2,7 +2,7 @@ Sieve - 1.2 + 1.3.1 Sieve Biarity Biarity @@ -10,8 +10,10 @@ https://github.com/Biarity/Sieve https://emojipedia-us.s3.amazonaws.com/thumbs/240/emoji-one/104/control-knobs_1f39b.png true - 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. - Summary of changes made in this release of the package. + + 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/ + + Added inequality supprort Copyright 2018 aspnetcore filter sort page paginate sieve search