We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am struggling to make an outter join using this library.
After some digging I found that GroupJoin is passing the inner collection as a Constant Expression, where it should honor the original one:
src/System.Linq.Dynamic.Core/DynamicQueryableExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Linq.Dynamic.Core/DynamicQueryableExtensions.cs b/src/System.Linq.Dynamic.Core/DynamicQueryableExtensions.cs index 0a32c0d..7a487fe 100644 --- a/src/System.Linq.Dynamic.Core/DynamicQueryableExtensions.cs +++ b/src/System.Linq.Dynamic.Core/DynamicQueryableExtensions.cs @@ -697,7 +697,7 @@ namespace System.Linq.Dynamic.Core typeof(Queryable), nameof(Queryable.GroupJoin), new[] { outer.ElementType, innerType, outerSelectorLambda.Body.Type, resultSelectorLambda.Body.Type }, outer.Expression, - Expression.Constant(inner), + inner.AsQueryable().Expression, Expression.Quote(outerSelectorLambda), Expression.Quote(innerSelectorLambda), Expression.Quote(resultSelectorLambda)));
I can see other extension methods such as Join use inner.AsQueryable().Expression instead of Expressoin.Constant(...).
When using Expression.Constant() EF will complain that it cannot materialize the object.
The text was updated successfully, but these errors were encountered:
If you think this is a bug, you can create a PR + additional unit-tests to fix this.
Also the example console application can be updated to reflect this situation.
Sorry, something went wrong.
Solved in the last release! Thanks!
Successfully merging a pull request may close this issue.
I am struggling to make an outter join using this library.
After some digging I found that GroupJoin is passing the inner collection as a Constant Expression, where it should honor the original one:
I can see other extension methods such as Join use inner.AsQueryable().Expression instead of Expressoin.Constant(...).
When using Expression.Constant() EF will complain that it cannot materialize the object.
The text was updated successfully, but these errors were encountered: