async query handler.

This commit is contained in:
David Lebee 2018-12-06 23:25:39 -06:00
parent ce07c3f6d2
commit ae1b7db8f9
3 changed files with 33 additions and 4 deletions

View File

@ -2,15 +2,22 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Copyright>Powered Softwares Inc.</Copyright>
<PackageLicenseUrl>MIT</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/PoweredSoft/DynamicQuery</PackageProjectUrl>
<RepositoryUrl>https://github.com/PoweredSoft/DynamicQuery</RepositoryUrl>
<RepositoryType>github</RepositoryType>
<PackageTags>powered,soft,dynamic,criteria,query,builder,asp,net,core</PackageTags>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;amp;r=g&amp;amp;d=retro</PackageIconUrl>
<Product>PoweredSoft.DynamicQuery.AspNetCore</Product>
<Description>This projects makes it easier to use dynamic query in a asp.net core mvc proejct.</Description>
<PackageId>PoweredSoft.DynamicQuery.AspNetCore</PackageId>
<PackageReleaseNotes>adding support for async operations.</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
<Company>PoweredSoft.DynamicQuery.AspNetCore</Company>
<Authors>PoweredSoft.DynamicQuery.AspNetCore</Authors>
</PropertyGroup>
<ItemGroup>

View File

@ -2,15 +2,22 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Copyright>Powered Softwares Inc.</Copyright>
<PackageLicenseUrl>MIT</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/PoweredSoft/DynamicQuery</PackageProjectUrl>
<RepositoryUrl>https://github.com/PoweredSoft/DynamicQuery</RepositoryUrl>
<RepositoryType>github</RepositoryType>
<PackageTags>powered,soft,dynamic,criteria,query,builder</PackageTags>
<Version>1.0.6</Version>
<Version>1.0.7</Version>
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;amp;r=g&amp;amp;d=retro</PackageIconUrl>
<Product>PoweredSoft.DynamicQuery</Product>
<Description>dynamic query based on string path very usefull for network requests.</Description>
<PackageId>PoweredSoft.DynamicQuery</PackageId>
<PackageReleaseNotes>adding support for async operations.</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
<Company>PoweredSoft.DynamicQuery</Company>
<Authors>PoweredSoft.DynamicQuery</Authors>
</PropertyGroup>
<ItemGroup>

View File

@ -66,6 +66,21 @@ public IQueryExecutionResult Read(
}
```
> New support for async
```csharp
[HttpPost]
public async Task<IQueryExecutionResult> Read(
[FromServices]YourContext context,
[FromServices]IQueryHandlerAsync handler,
[FromBody]IQueryCriteria criteria)
{
IQueryable<OfSomething> query = context.Somethings;
var result = await handler.ExecuteAsync(query, criteria);
return result;
}
```
### Sample Web Project - ASP.NET CORE + EF Core
Visit: https://github.com/PoweredSoft/DynamicQueryAspNetCoreSample