-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support in DomainServiceTestHost for asynchronous queries that return a single entity #464
Add support in DomainServiceTestHost for asynchronous queries that return a single entity #464
Conversation
* QuerySingleAsync with two overloads Expression<Func<TDomainService, TEntity>>, Expression<Func<TDomainService, Task<TEntity>>> queryOperation * Added overload for TryQuerySingle to handle async query
@dotnet-policy-service agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that you changed CityDomainService so that there is a failing code generation test, which needs to be resolved.
You can run TestCityClientProxies and look at the output for instructions of how to update the code generation baseline.
The alternative is to use the AsyncServerSideDomainService (or similar named domain service) instead, it should have a queriy returning Task
src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Cities/CityDomainService.cs
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good so Feel free to merge @erikoijwall or @SandstromErik
I am wondering if we in the future should allow "Query" to be used for single entity returning methods as well (just add overloads which calls Single...)
Add support in DomainServiceTestHost for asynchronous queries that return a single entity
QuerySingleAsync
with two overloadsExpression<Func<TDomainService, TEntity>> queryOperation
Expression<Func<TDomainService, Task<TEntity>>> queryOperation
Added overload for
TryQuerySingle
to handle async query