Skip to content

Commit 117367b

Browse files
maca88fredericDelaporte
authored andcommitted
Optimize Contains method check
1 parent 87e43e3 commit 117367b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/NHibernate/Linq/Visitors/ExpressionParameterVisitor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ protected override Expression VisitMethodCall(MethodCallExpression expression)
103103
}
104104

105105
if (_functionRegistry != null &&
106+
method.Name == nameof(Queryable.Contains) &&
106107
_functionRegistry.TryGetGenerator(method, out var generator) &&
107108
generator is CollectionContainsGenerator)
108109
{

0 commit comments

Comments
 (0)