mirror of
https://github.com/Biarity/Sieve.git
synced 2025-10-24 06:17:12 +02:00
Modular mapping configuration (#162)
* Modular configuration for property mappings * Update Readme, unit tests and sample Co-authored-by: Steven Decoodt <steven.decoodt@vinci-energies.net>
This commit is contained in:
15
Sieve.Sample/Entities/SieveConfigurationForPost.cs
Normal file
15
Sieve.Sample/Entities/SieveConfigurationForPost.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Sieve.Services;
|
||||
|
||||
namespace Sieve.Sample.Entities
|
||||
{
|
||||
public class SieveConfigurationForPost : ISieveConfiguration
|
||||
{
|
||||
public void Configure(SievePropertyMapper mapper)
|
||||
{
|
||||
mapper.Property<Post>(p => p.Title)
|
||||
.CanSort()
|
||||
.CanFilter()
|
||||
.HasName("CustomTitleName");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user