This commit is contained in:
Biarity 2019-11-17 09:15:07 +10:00
parent 0dae8c8beb
commit d86e35f77c
15 changed files with 26 additions and 25 deletions

View File

@ -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 &gt; 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>

View File

@ -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;

View File

@ -2,7 +2,7 @@
namespace SieveTests.Entities
{
public class ApplicationDbContext : DbContext
public class ApplicationDbContext : DbContext
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { }

View File

@ -4,7 +4,7 @@ using Sieve.Attributes;
namespace SieveTests.Entities
{
public class Post
public class Post
{
public int Id { get; set; }

View File

@ -1,6 +1,5 @@
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace SieveTests.Migrations
{

View File

@ -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)
{

View File

@ -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);

View File

@ -15,7 +15,7 @@ using SieveTests.Services;
namespace SieveTests
{
public class Startup
public class Startup
{
public Startup(IConfiguration configuration)
{

View File

@ -3,7 +3,7 @@ using Sieve.Attributes;
namespace SieveUnitTests.Entities
{
public class BaseEntity
public class BaseEntity
{
public int Id { get; set; }

View File

@ -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; }

View File

@ -3,7 +3,7 @@ using Sieve.Attributes;
namespace SieveUnitTests.Entities
{
public class Post : BaseEntity
public class Post : BaseEntity
{
[Sieve(CanFilter = true, CanSort = true)]

View File

@ -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;

View File

@ -5,7 +5,7 @@ using SieveUnitTests.Entities;
namespace SieveUnitTests.Services
{
public class ApplicationSieveProcessor : SieveProcessor
public class ApplicationSieveProcessor : SieveProcessor
{
public ApplicationSieveProcessor(
IOptions<SieveOptions> options,