Update README.md

This commit is contained in:
dlebee 2018-11-18 05:51:55 -06:00 committed by GitHub
parent 438306203a
commit 94dda8f85d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<OfSomething> 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&lt;T&gt; | [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
IQueryConvertInterceptor&lt;T&gt; | [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