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
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<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>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>
|
</Description>
|
||||||
<Copyright>Copyright 2018</Copyright>
|
<Copyright>Copyright 2018</Copyright>
|
||||||
@ -10,7 +10,10 @@
|
|||||||
<PackageProjectUrl>https://github.com/Biarity/Sieve</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/Biarity/Sieve</PackageProjectUrl>
|
||||||
<PackageIconUrl>https://emojipedia-us.s3.amazonaws.com/thumbs/240/twitter/120/alembic_2697.png</PackageIconUrl>
|
<PackageIconUrl>https://emojipedia-us.s3.amazonaws.com/thumbs/240/twitter/120/alembic_2697.png</PackageIconUrl>
|
||||||
<RepositoryUrl></RepositoryUrl>
|
<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>
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||||
<Authors>Biarity</Authors>
|
<Authors>Biarity</Authors>
|
||||||
|
@ -7,7 +7,7 @@ using SieveTests.Entities;
|
|||||||
|
|
||||||
namespace SieveTests.Controllers
|
namespace SieveTests.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]/[action]")]
|
[Route("api/[controller]/[action]")]
|
||||||
public class PostsController : Controller
|
public class PostsController : Controller
|
||||||
{
|
{
|
||||||
private readonly ISieveProcessor _sieveProcessor;
|
private readonly ISieveProcessor _sieveProcessor;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace SieveTests.Entities
|
namespace SieveTests.Entities
|
||||||
{
|
{
|
||||||
public class ApplicationDbContext : DbContext
|
public class ApplicationDbContext : DbContext
|
||||||
{
|
{
|
||||||
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { }
|
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { }
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ using Sieve.Attributes;
|
|||||||
|
|
||||||
namespace SieveTests.Entities
|
namespace SieveTests.Entities
|
||||||
{
|
{
|
||||||
public class Post
|
public class Post
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using System;
|
||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace SieveTests.Migrations
|
namespace SieveTests.Migrations
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ using SieveTests.Entities;
|
|||||||
|
|
||||||
namespace SieveTests.Services
|
namespace SieveTests.Services
|
||||||
{
|
{
|
||||||
public class ApplicationSieveProcessor : SieveProcessor
|
public class ApplicationSieveProcessor : SieveProcessor
|
||||||
{
|
{
|
||||||
public ApplicationSieveProcessor(IOptions<SieveOptions> options, ISieveCustomSortMethods customSortMethods, ISieveCustomFilterMethods customFilterMethods) : base(options, customSortMethods, customFilterMethods)
|
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 SieveTests.Entities;
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace SieveTests.Services
|
namespace SieveTests.Services
|
||||||
{
|
{
|
||||||
public class SieveCustomFilterMethods : ISieveCustomFilterMethods
|
public class SieveCustomFilterMethods : ISieveCustomFilterMethods
|
||||||
{
|
{
|
||||||
public IQueryable<Post> IsNew(IQueryable<Post> source, string op, string[] values)
|
public IQueryable<Post> IsNew(IQueryable<Post> source, string op, string[] values)
|
||||||
=> source.Where(p => p.LikeCount < 100 && p.CommentCount < 5);
|
=> source.Where(p => p.LikeCount < 100 && p.CommentCount < 5);
|
||||||
|
@ -15,7 +15,7 @@ using SieveTests.Services;
|
|||||||
|
|
||||||
namespace SieveTests
|
namespace SieveTests
|
||||||
{
|
{
|
||||||
public class Startup
|
public class Startup
|
||||||
{
|
{
|
||||||
public Startup(IConfiguration configuration)
|
public Startup(IConfiguration configuration)
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@ using Sieve.Attributes;
|
|||||||
|
|
||||||
namespace SieveUnitTests.Entities
|
namespace SieveUnitTests.Entities
|
||||||
{
|
{
|
||||||
public class BaseEntity
|
public class BaseEntity
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
using System;
|
using Sieve.Attributes;
|
||||||
using Sieve.Attributes;
|
|
||||||
|
|
||||||
namespace SieveUnitTests.Entities
|
namespace SieveUnitTests.Entities
|
||||||
{
|
{
|
||||||
public class Comment : BaseEntity
|
public class Comment : BaseEntity
|
||||||
{
|
{
|
||||||
[Sieve(CanFilter = true)]
|
[Sieve(CanFilter = true)]
|
||||||
public string Text { get; set; }
|
public string Text { get; set; }
|
||||||
|
@ -3,7 +3,7 @@ using Sieve.Attributes;
|
|||||||
|
|
||||||
namespace SieveUnitTests.Entities
|
namespace SieveUnitTests.Entities
|
||||||
{
|
{
|
||||||
public class Post : BaseEntity
|
public class Post : BaseEntity
|
||||||
{
|
{
|
||||||
|
|
||||||
[Sieve(CanFilter = true, CanSort = true)]
|
[Sieve(CanFilter = true, CanSort = true)]
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using Sieve.Exceptions;
|
||||||
using Sieve.Models;
|
using Sieve.Models;
|
||||||
using SieveUnitTests.Entities;
|
using SieveUnitTests.Entities;
|
||||||
using SieveUnitTests.Services;
|
using SieveUnitTests.Services;
|
||||||
using System.Linq;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Sieve.Exceptions;
|
|
||||||
|
|
||||||
namespace SieveUnitTests
|
namespace SieveUnitTests
|
||||||
{
|
{
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class Mapper
|
public class Mapper
|
||||||
{
|
{
|
||||||
private readonly ApplicationSieveProcessor _processor;
|
private readonly ApplicationSieveProcessor _processor;
|
||||||
|
@ -5,7 +5,7 @@ using SieveUnitTests.Entities;
|
|||||||
|
|
||||||
namespace SieveUnitTests.Services
|
namespace SieveUnitTests.Services
|
||||||
{
|
{
|
||||||
public class ApplicationSieveProcessor : SieveProcessor
|
public class ApplicationSieveProcessor : SieveProcessor
|
||||||
{
|
{
|
||||||
public ApplicationSieveProcessor(
|
public ApplicationSieveProcessor(
|
||||||
IOptions<SieveOptions> options,
|
IOptions<SieveOptions> options,
|
||||||
|
Loading…
Reference in New Issue
Block a user