mirror of
https://github.com/Biarity/Sieve.git
synced 2025-09-19 06:39:43 +02:00
* Migrate tests to xunit
* Update sample project to dotnetcore3.1 * Use Sqlite in sample project to run it everywhere * Fix: Filter with escaped comma * Fix: Filter "null" does not work with Contains or StartsWith * Code cleanup: Adjust namespaces, adjust usings
This commit is contained in:
24
Sieve.Sample/Services/ApplicationSieveProcessor.cs
Normal file
24
Sieve.Sample/Services/ApplicationSieveProcessor.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Microsoft.Extensions.Options;
|
||||
using Sieve.Models;
|
||||
using Sieve.Sample.Entities;
|
||||
using Sieve.Services;
|
||||
|
||||
namespace Sieve.Sample.Services
|
||||
{
|
||||
public class ApplicationSieveProcessor : SieveProcessor
|
||||
{
|
||||
public ApplicationSieveProcessor(IOptions<SieveOptions> options, ISieveCustomSortMethods customSortMethods, ISieveCustomFilterMethods customFilterMethods) : base(options, customSortMethods, customFilterMethods)
|
||||
{
|
||||
}
|
||||
|
||||
protected override SievePropertyMapper MapProperties(SievePropertyMapper mapper)
|
||||
{
|
||||
mapper.Property<Post>(p => p.Title)
|
||||
.CanSort()
|
||||
.CanFilter()
|
||||
.HasName("CustomTitleName");
|
||||
|
||||
return mapper;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user