You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Guys.
I use MockQueryable approach for EF async methods testing.
But I've noticed that it doesn't work for async methods for collections, exactly 'bulk extensions': https://entityframework-extensions.net/bulk-update
Message: System.AggregateException : One or more errors occurred. (Field '_queryCompiler' defined on type 'Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider' is not a field on the target object which is of type 'TestAsyncEnumerableEfCore[TEntity]'.) ---- System.ArgumentException : Field '_queryCompiler' defined on type 'Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider' is not a field on the target object which is of type 'TestAsyncEnumerableEfCore[TEntity]'.
After some investigation, I found out that Bulk extensions methods require using EntityQueryProvider as provider and IQueryCompiler as _queryCompiler field.
I use the next code to set up async EF methods for testing:
Hello. Thanks for you contribution. Sorry for the late answer. Unfortunately I'm very busy at the moment. If you provide a pull request with fix of the issue I would be happy to include it to the next release. Please don't forget to cover the case by additional tests to minimize possibility of regressions for the future. Thanks for the understanding.
Hi Guys.
I use MockQueryable approach for EF async methods testing.
But I've noticed that it doesn't work for async methods for collections, exactly 'bulk extensions': https://entityframework-extensions.net/bulk-update
Message: System.AggregateException : One or more errors occurred. (Field '_queryCompiler' defined on type 'Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider' is not a field on the target object which is of type 'TestAsyncEnumerableEfCore[TEntity]'.) ---- System.ArgumentException : Field '_queryCompiler' defined on type 'Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider' is not a field on the target object which is of type 'TestAsyncEnumerableEfCore[TEntity]'.
After some investigation, I found out that Bulk extensions methods require using EntityQueryProvider as provider and IQueryCompiler as _queryCompiler field.
I use the next code to set up async EF methods for testing:
Thanks.
The text was updated successfully, but these errors were encountered: