diff --git a/README.md b/README.md index ed03469..2621cbe 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,21 @@ public class Startup ``` +> How to use in a controller + +```csharp +[HttpPost] +public IQueryExecutionResult Read( + [FromServices]YourContext context, + [FromServices]IQueryHandler handler, + [FromBody]IQueryCriteria criteria) +{ + IQueryable query = context.Somethings; + var result = handler.Execute(query, criteria); + return result; +} +``` + ### Sample Web Project - ASP.NET CORE + EF Core Visit: https://github.com/PoweredSoft/DynamicQueryAspNetCoreSample @@ -134,4 +149,4 @@ IAggregateInterceptor | [interface](../master/PoweredSoft.DynamicQuery.Core/IAgg Interceptor | Interface | Example | Description ----------------------------------|---------------------------------------------------------------------------------------|-------------------------------------------------------------|------------------------------------------------------------------------------------------------ IQueryConvertInterceptor | [interface](../master/PoweredSoft.DynamicQuery.Core/IQueryConvertInterceptor.cs) | [test](../master/PoweredSoft.DynamicQuery.Test/ConvertibleInterceptorTests.cs) | This interceptor allows you to replace the object that is being returned by the query, by another object instance -IQueryConvertInterceptor<T> | [interface](../master/PoweredSoft.DynamicQuery.Core/IQueryConvertInterceptor.cs) | [test](../master/PoweredSoft.DynamicQuery.Test/ConvertibleInterceptorTests.cs#L72) | This interceptor allows you to replace the object that is being returned by the query, by another object instance \ No newline at end of file +IQueryConvertInterceptor<T> | [interface](../master/PoweredSoft.DynamicQuery.Core/IQueryConvertInterceptor.cs) | [test](../master/PoweredSoft.DynamicQuery.Test/ConvertibleInterceptorTests.cs#L72) | This interceptor allows you to replace the object that is being returned by the query, by another object instance