We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93d7246 commit bea25bfCopy full SHA for bea25bf
src/NHibernate/Linq/Visitors/ExpressionKeyVisitor.cs
@@ -81,6 +81,8 @@ protected override Expression VisitConstant(ConstantExpression expression)
81
{
82
NamedParameter param;
83
84
+ if (_constantToParameterMap == null)
85
+ throw new InvalidOperationException("Cannot visit a constant without a constant to parameter map.");
86
if (_constantToParameterMap.TryGetValue(expression, out param) && insideSelectClause == false)
87
88
// Nulls generate different query plans. X = variable generates a different query depending on if variable is null or not.
@@ -243,4 +245,4 @@ private void VisitMethod(MethodInfo methodInfo)
243
245
}
244
246
247
-}
248
+}
0 commit comments