Skip to content

Commit 47125b8

Browse files
david-garcia-garciaStefH
authored andcommitted
Fix Parsing Config not passed down to expression parser in JOIN (#201)
1 parent 9533b77 commit 47125b8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/System.Linq.Dynamic.Core/DynamicQueryableExtensions.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ public static IQueryable GroupJoin([NotNull] this IQueryable outer, [CanBeNull]
683683
LambdaExpression outerSelectorLambda = DynamicExpressionParser.ParseLambda(config, createParameterCtor, outerType, null, outerKeySelector, args);
684684
LambdaExpression innerSelectorLambda = DynamicExpressionParser.ParseLambda(config, createParameterCtor, innerType, null, innerKeySelector, args);
685685

686-
CheckOuterAndInnerTypes(createParameterCtor, outerType, innerType, outerKeySelector, innerKeySelector, ref outerSelectorLambda, ref innerSelectorLambda, args);
686+
CheckOuterAndInnerTypes(config, createParameterCtor, outerType, innerType, outerKeySelector, innerKeySelector, ref outerSelectorLambda, ref innerSelectorLambda, args);
687687

688688
ParameterExpression[] parameters =
689689
{
@@ -739,7 +739,7 @@ public static IQueryable Join([NotNull] this IQueryable outer, [CanBeNull] Parsi
739739
LambdaExpression outerSelectorLambda = DynamicExpressionParser.ParseLambda(config, createParameterCtor, outerType, null, outerKeySelector, args);
740740
LambdaExpression innerSelectorLambda = DynamicExpressionParser.ParseLambda(config, createParameterCtor, innerType, null, innerKeySelector, args);
741741

742-
CheckOuterAndInnerTypes(createParameterCtor, outerType, innerType, outerKeySelector, innerKeySelector, ref outerSelectorLambda, ref innerSelectorLambda, args);
742+
CheckOuterAndInnerTypes(config, createParameterCtor, outerType, innerType, outerKeySelector, innerKeySelector, ref outerSelectorLambda, ref innerSelectorLambda, args);
743743

744744
ParameterExpression[] parameters =
745745
{
@@ -1923,7 +1923,7 @@ public static IQueryable Where([NotNull] this IQueryable source, [NotNull] Lambd
19231923
#endregion
19241924

19251925
#region Private Helpers
1926-
private static void CheckOuterAndInnerTypes(bool createParameterCtor, Type outerType, Type innerType, string outerKeySelector, string innerKeySelector, ref LambdaExpression outerSelectorLambda, ref LambdaExpression innerSelectorLambda, params object[] args)
1926+
private static void CheckOuterAndInnerTypes(ParsingConfig config, bool createParameterCtor, Type outerType, Type innerType, string outerKeySelector, string innerKeySelector, ref LambdaExpression outerSelectorLambda, ref LambdaExpression innerSelectorLambda, params object[] args)
19271927
{
19281928
Type outerSelectorReturnType = outerSelectorLambda.Body.Type;
19291929
Type innerSelectorReturnType = innerSelectorLambda.Body.Type;
@@ -1941,12 +1941,12 @@ private static void CheckOuterAndInnerTypes(bool createParameterCtor, Type outer
19411941
if (TypeHelper.IsNullableType(outerSelectorReturnType) && !TypeHelper.IsNullableType(innerSelectorReturnType))
19421942
{
19431943
innerSelectorReturnType = ExpressionParser.ToNullableType(innerSelectorReturnType);
1944-
innerSelectorLambda = DynamicExpressionParser.ParseLambda(createParameterCtor, innerType, innerSelectorReturnType, innerKeySelector, args);
1944+
innerSelectorLambda = DynamicExpressionParser.ParseLambda(config, createParameterCtor, innerType, innerSelectorReturnType, innerKeySelector, args);
19451945
}
19461946
else if (!TypeHelper.IsNullableType(outerSelectorReturnType) && TypeHelper.IsNullableType(innerSelectorReturnType))
19471947
{
19481948
outerSelectorReturnType = ExpressionParser.ToNullableType(outerSelectorReturnType);
1949-
outerSelectorLambda = DynamicExpressionParser.ParseLambda(createParameterCtor, outerType, outerSelectorReturnType, outerKeySelector, args);
1949+
outerSelectorLambda = DynamicExpressionParser.ParseLambda(config, createParameterCtor, outerType, outerSelectorReturnType, outerKeySelector, args);
19501950
}
19511951

19521952
// If types are still not the same, throw an Exception

0 commit comments

Comments
 (0)