Skip to content

Commit

Permalink
Update README.md (#168)
Browse files Browse the repository at this point in the history
Fix Fluent API example on readme
  • Loading branch information
PizzaConsole authored Feb 13, 2022
1 parent 863d75b commit 7aaadcc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<Post>(p => p.Title)
.CanFilter()
Expand Down Expand Up @@ -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);
}
}
```
Expand Down

0 comments on commit 7aaadcc

Please sign in to comment.