mirror of
https://github.com/Biarity/Sieve.git
synced 2024-11-22 05:22:57 +01:00
Injecting interface unnecessary
This commit is contained in:
parent
4e47a3a0ef
commit
cf9cb4160c
@ -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:
|
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
|
### 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:
|
For instance:
|
||||||
```
|
```
|
||||||
services.AddScoped<ISieveCustomSortMethods, SieveCustomSortMethods>();
|
services.AddScoped<SieveCustomSortMethods>();
|
||||||
services.AddScoped<ISieveCustomFilterMethods, SieveCustomFilterMethods>();
|
services.AddScoped<SieveCustomFilterMethods>();
|
||||||
```
|
```
|
||||||
Where `SieveCustomSortMethodsOfPosts` for example is:
|
Where `SieveCustomSortMethodsOfPosts` for example is:
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user