diff --git a/README.md b/README.md index 2621cbe..6e5e9d4 100644 --- a/README.md +++ b/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 query = context.Somethings; + var result = handler.Execute(query, criteria); + return result; +} + [HttpPost] public IQueryExecutionResult Read( [FromServices]YourContext context,