Injecting interface unnecessary

This commit is contained in:
Biarity 2018-02-07 14:51:34 +10:00 committed by GitHub
parent 4e47a3a0ef
commit cf9cb4160c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ We'll use Sieve to add sorting, filtering, and pagination capabilities when GET-
Inject the `SieveProcessor` service. So in `Startup.cs` add:
```
services.AddScoped<ISieveProcessor, SieveProcessor>();
services.AddScoped<SieveProcessor>();
```
### 2. Tell Sieve which properties you'd like to sort/filter in your models
@ -65,8 +65,8 @@ If you want to add custom sort/filter methods, inject `ISieveCustomSortMethods`
For instance:
```
services.AddScoped<ISieveCustomSortMethods, SieveCustomSortMethods>();
services.AddScoped<ISieveCustomFilterMethods, SieveCustomFilterMethods>();
services.AddScoped<SieveCustomSortMethods>();
services.AddScoped<SieveCustomFilterMethods>();
```
Where `SieveCustomSortMethodsOfPosts` for example is:
```