mirror of
https://github.com/Biarity/Sieve.git
synced 2025-09-20 23:29:39 +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:
@@ -13,11 +13,18 @@ namespace Sieve.Sample.Services
|
||||
|
||||
protected override SievePropertyMapper MapProperties(SievePropertyMapper mapper)
|
||||
{
|
||||
// Option 1: Map all properties centrally
|
||||
mapper.Property<Post>(p => p.Title)
|
||||
.CanSort()
|
||||
.CanFilter()
|
||||
.HasName("CustomTitleName");
|
||||
|
||||
// Option 2: Manually apply functionally grouped mapping configurations
|
||||
//mapper.ApplyConfiguration<SieveConfigurationForPost>();
|
||||
|
||||
// Option 3: Scan and apply all configurations
|
||||
//mapper.ApplyConfigurationsFromAssembly(typeof(ApplicationSieveProcessor).Assembly);
|
||||
|
||||
return mapper;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user