File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/NHibernate/Linq/ExpressionTransformers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ internal class LikeTransformer : IExpressionTransformer<MethodCallExpression>
17
17
18
18
public Expression Transform ( MethodCallExpression expression )
19
19
{
20
- if ( expression . Method == ReflectionCache . StringMethods . StartsWith )
20
+ if ( expression . Method . Name == nameof ( string . StartsWith ) && expression . Method == ReflectionCache . StringMethods . StartsWith )
21
21
{
22
22
return Expression . Call (
23
23
Like ,
@@ -26,7 +26,7 @@ public Expression Transform(MethodCallExpression expression)
26
26
) ;
27
27
}
28
28
29
- if ( expression . Method == ReflectionCache . StringMethods . EndsWith )
29
+ if ( expression . Method . Name == nameof ( string . EndsWith ) && expression . Method == ReflectionCache . StringMethods . EndsWith )
30
30
{
31
31
return Expression . Call (
32
32
Like ,
@@ -35,7 +35,7 @@ public Expression Transform(MethodCallExpression expression)
35
35
) ;
36
36
}
37
37
38
- if ( expression . Method == ReflectionCache . StringMethods . Contains )
38
+ if ( expression . Method . Name == nameof ( string . Contains ) && expression . Method == ReflectionCache . StringMethods . Contains )
39
39
{
40
40
return Expression . Call (
41
41
Like ,
You can’t perform that action at this time.
0 commit comments