File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
1
# Basics
2
- - Let say you have a Model like that:
3
2
3
+ Entity:
4
4
``` csharp
5
5
public class Blog
6
6
{
@@ -12,18 +12,17 @@ public class Blog
12
12
}
13
13
```
14
14
15
- - Let's create a filtering DTO like that:
16
-
15
+ Create a filter object for Blog Entity:
17
16
``` csharp
18
- public class BlogFilterDto : FilterBase < Blog >
17
+ public class BlogFilterDto : FilterBase
19
18
{
20
19
public int CategoryId { get ; set ; }
21
20
public int Priority { get ; set ; }
22
21
public bool ? IsPublished { get ; set ; }
23
22
}
24
23
```
25
24
26
- - Let's create a sample Controller and get the DTO from querystring
25
+ - Create a sample Controller and get the DTO from querystring:
27
26
28
27
``` csharp
29
28
public class BlogsController : ControllerBase
@@ -48,4 +47,4 @@ public class BlogsController : ControllerBase
48
47
* ` /Blogs?IsPublished=True&Priority=1 `
49
48
* ` /Blogs?IsPublished=True&Priority=5&CategoryId=1 `
50
49
51
- ***
50
+ ***
You can’t perform that action at this time.
0 commit comments