From 6911734415c3c824b9dd228532c3fdb26698123c Mon Sep 17 00:00:00 2001 From: Brice Lambson Date: Wed, 5 Jun 2019 12:02:38 -0700 Subject: [PATCH] Fix #860 --- .../Core/Objects/ELinq/QueryParameterExpression.cs | 2 +- .../Query/CompiledQuery/CompiledQueryTests.cs | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) 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;