mirror of
https://github.com/Biarity/Sieve.git
synced 2024-11-21 21:12:50 +01:00
v2.3.3
This commit is contained in:
parent
0dae8c8beb
commit
d86e35f77c
@ -186,7 +186,7 @@ namespace Sieve.Services
|
||||
{
|
||||
propertyValue = Expression.PropertyOrField(propertyValue, part);
|
||||
}
|
||||
|
||||
|
||||
if (filterTerm.Values == null) continue;
|
||||
|
||||
foreach (var filterTermValue in filterTerm.Values)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Version>2.3.2</Version>
|
||||
<Version>2.3.3</Version>
|
||||
<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. Documentation available on GitHub: https://github.com/Biarity/Sieve/
|
||||
</Description>
|
||||
<Copyright>Copyright 2018</Copyright>
|
||||
@ -10,7 +10,10 @@
|
||||
<PackageProjectUrl>https://github.com/Biarity/Sieve</PackageProjectUrl>
|
||||
<PackageIconUrl>https://emojipedia-us.s3.amazonaws.com/thumbs/240/twitter/120/alembic_2697.png</PackageIconUrl>
|
||||
<RepositoryUrl></RepositoryUrl>
|
||||
<PackageReleaseNotes>Allow subvalues with identical names (#54)</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>Only Skip when pageSize > 0 (#63)
|
||||
Added support for generic filter and sort methods (#60)
|
||||
Don't process when filterTerm.Values is null (#59)
|
||||
</PackageReleaseNotes>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Authors>Biarity</Authors>
|
||||
|
@ -7,7 +7,7 @@ using SieveTests.Entities;
|
||||
|
||||
namespace SieveTests.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[Route("api/[controller]/[action]")]
|
||||
public class PostsController : Controller
|
||||
{
|
||||
private readonly ISieveProcessor _sieveProcessor;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace SieveTests.Entities
|
||||
{
|
||||
public class ApplicationDbContext : DbContext
|
||||
public class ApplicationDbContext : DbContext
|
||||
{
|
||||
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { }
|
||||
|
||||
|
@ -4,7 +4,7 @@ using Sieve.Attributes;
|
||||
|
||||
namespace SieveTests.Entities
|
||||
{
|
||||
public class Post
|
||||
public class Post
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SieveTests.Migrations
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ using SieveTests.Entities;
|
||||
|
||||
namespace SieveTests.Services
|
||||
{
|
||||
public class ApplicationSieveProcessor : SieveProcessor
|
||||
public class ApplicationSieveProcessor : SieveProcessor
|
||||
{
|
||||
public ApplicationSieveProcessor(IOptions<SieveOptions> options, ISieveCustomSortMethods customSortMethods, ISieveCustomFilterMethods customFilterMethods) : base(options, customSortMethods, customFilterMethods)
|
||||
{
|
||||
|
@ -1,10 +1,10 @@
|
||||
using Sieve.Services;
|
||||
using System.Linq;
|
||||
using Sieve.Services;
|
||||
using SieveTests.Entities;
|
||||
using System.Linq;
|
||||
|
||||
namespace SieveTests.Services
|
||||
{
|
||||
public class SieveCustomFilterMethods : ISieveCustomFilterMethods
|
||||
public class SieveCustomFilterMethods : ISieveCustomFilterMethods
|
||||
{
|
||||
public IQueryable<Post> IsNew(IQueryable<Post> source, string op, string[] values)
|
||||
=> source.Where(p => p.LikeCount < 100 && p.CommentCount < 5);
|
||||
|
@ -15,7 +15,7 @@ using SieveTests.Services;
|
||||
|
||||
namespace SieveTests
|
||||
{
|
||||
public class Startup
|
||||
public class Startup
|
||||
{
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
|
@ -3,7 +3,7 @@ using Sieve.Attributes;
|
||||
|
||||
namespace SieveUnitTests.Entities
|
||||
{
|
||||
public class BaseEntity
|
||||
public class BaseEntity
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
using System;
|
||||
using Sieve.Attributes;
|
||||
using Sieve.Attributes;
|
||||
|
||||
namespace SieveUnitTests.Entities
|
||||
{
|
||||
public class Comment : BaseEntity
|
||||
public class Comment : BaseEntity
|
||||
{
|
||||
[Sieve(CanFilter = true)]
|
||||
public string Text { get; set; }
|
||||
|
@ -3,7 +3,7 @@ using Sieve.Attributes;
|
||||
|
||||
namespace SieveUnitTests.Entities
|
||||
{
|
||||
public class Post : BaseEntity
|
||||
public class Post : BaseEntity
|
||||
{
|
||||
|
||||
[Sieve(CanFilter = true, CanSort = true)]
|
||||
|
@ -351,7 +351,7 @@ namespace SieveUnitTests
|
||||
Assert.AreEqual(1, resultCount);
|
||||
Assert.AreEqual(3, entry.Id);
|
||||
}
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public void OrValueFilteringWorks()
|
||||
{
|
||||
|
@ -1,14 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Sieve.Exceptions;
|
||||
using Sieve.Models;
|
||||
using SieveUnitTests.Entities;
|
||||
using SieveUnitTests.Services;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Sieve.Exceptions;
|
||||
|
||||
namespace SieveUnitTests
|
||||
{
|
||||
[TestClass]
|
||||
[TestClass]
|
||||
public class Mapper
|
||||
{
|
||||
private readonly ApplicationSieveProcessor _processor;
|
||||
|
@ -5,7 +5,7 @@ using SieveUnitTests.Entities;
|
||||
|
||||
namespace SieveUnitTests.Services
|
||||
{
|
||||
public class ApplicationSieveProcessor : SieveProcessor
|
||||
public class ApplicationSieveProcessor : SieveProcessor
|
||||
{
|
||||
public ApplicationSieveProcessor(
|
||||
IOptions<SieveOptions> options,
|
||||
|
Loading…
Reference in New Issue
Block a user