Update README.md
This commit is contained in:
parent
94dda8f85d
commit
063a1cad61
16
README.md
16
README.md
@ -38,6 +38,22 @@ public class Startup
|
||||
> How to use in a controller
|
||||
|
||||
```csharp
|
||||
|
||||
[HttpGet]
|
||||
public IQueryExecutionResult Get(
|
||||
[FromServices]YourContext context,
|
||||
[FromServices]IQueryHandler handler,
|
||||
[FromServices]IQueryCriteria criteria,
|
||||
int? page = null,
|
||||
int? pageSize = null)
|
||||
{
|
||||
criteria.Page = page;
|
||||
criteria.PageSize = pageSize;
|
||||
IQueryable<OfSomething> query = context.Somethings;
|
||||
var result = handler.Execute(query, criteria);
|
||||
return result;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IQueryExecutionResult Read(
|
||||
[FromServices]YourContext context,
|
||||
|
Loading…
Reference in New Issue
Block a user