mirror of
https://github.com/Biarity/Sieve.git
synced 2024-12-18 01:27:50 +01:00
25 lines
738 B
C#
25 lines
738 B
C#
using Microsoft.Extensions.Options;
|
|
using Sieve.Models;
|
|
using Sieve.Services;
|
|
using SieveTests.Entities;
|
|
|
|
namespace SieveTests.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;
|
|
}
|
|
}
|
|
}
|