From 063a1cad6153d900ce1648b7c76755010c58ef28 Mon Sep 17 00:00:00 2001 From: dlebee <36390643+dlebee@users.noreply.github.com> Date: Sun, 18 Nov 2018 05:53:11 -0600 Subject: [PATCH] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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,