From 7aaadccf187050b0e2a28f54f532b3b3b3db91d8 Mon Sep 17 00:00:00 2001 From: The Iron Fist Date: Sun, 13 Feb 2022 03:19:05 -0700 Subject: [PATCH] Update README.md (#168) Fix Fluent API example on readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8049fad..f5fd5b1 100644 --- a/README.md +++ b/README.md @@ -231,7 +231,7 @@ It is recommended that you write exception-handling middleware to globally handl You can find an example project incorporating most Sieve concepts in [SieveTests](https://github.com/Biarity/Sieve/tree/master/SieveTests). ## Fluent API -To use the Fluent API instead of attributes in marking properties, setup an alternative `SieveProcessor` that overrides `MapProperties`. For example: +To use the Fluent API instead of attributes in marking properties, setup an alternative `SieveProcessor` that overrides `MapProperties`. For [example](https://github.com/Biarity/Sieve/blob/master/Sieve.Sample/Services/ApplicationSieveProcessor.cs): ```C# public class ApplicationSieveProcessor : SieveProcessor @@ -278,7 +278,7 @@ To enable functional grouping of mappings the `ISieveConfiguration` interface wa ```C# public class SieveConfigurationForPost : ISieveConfiguration { - protected override SievePropertyMapper Configure(SievePropertyMapper mapper) + public void Configure(SievePropertyMapper mapper) { mapper.Property(p => p.Title) .CanFilter() @@ -330,7 +330,7 @@ public class ApplicationSieveProcessor : SieveProcessor protected override SievePropertyMapper MapProperties(SievePropertyMapper mapper) { - return mapper.ApplyConfigurationForAssembly(typeof(ApplicationSieveProcessor).Assembly); + return mapper.ApplyConfigurationsFromAssembly(typeof(ApplicationSieveProcessor).Assembly); } } ```