Skip to content

Commit 614650a

Browse files
committed
Optimize Contains method check
1 parent 67d2640 commit 614650a

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)