diff --git a/src/EntityFramework/Core/Objects/ELinq/QueryParameterExpression.cs b/src/EntityFramework/Core/Objects/ELinq/QueryParameterExpression.cs index e8fc75746c..78ffebdf25 100644 --- a/src/EntityFramework/Core/Objects/ELinq/QueryParameterExpression.cs +++ b/src/EntityFramework/Core/Objects/ELinq/QueryParameterExpression.cs @@ -78,7 +78,7 @@ internal object EvaluateParameter(object[] arguments) // internal QueryParameterExpression EscapeParameterForLike(Expression>> method) { - Expression wrappedExpression = Expression.Property(Invoke(Constant(method), _funcletizedExpression), "Item1"); + Expression wrappedExpression = Expression.Property(Invoke(method, _funcletizedExpression), "Item1"); return new QueryParameterExpression(_parameterReference, wrappedExpression, _compiledQueryParameters); } diff --git a/test/EntityFramework/FunctionalTests/Query/CompiledQuery/CompiledQueryTests.cs b/test/EntityFramework/FunctionalTests/Query/CompiledQuery/CompiledQueryTests.cs index b9905bdc09..d29485acad 100644 --- a/test/EntityFramework/FunctionalTests/Query/CompiledQuery/CompiledQueryTests.cs +++ b/test/EntityFramework/FunctionalTests/Query/CompiledQuery/CompiledQueryTests.cs @@ -64,11 +64,7 @@ private CompiledQueryContext CreateCompiledQueryContext() return ctx; } - [Fact( -#if NETCOREAPP3_0 - Skip = "#860" -#endif - )] + [Fact] public void CompiledQuery_with_contains_does_not_hold_reference_to_context() { WeakReference wr;