public Expression VisitSqlEntityConstantExpression (SqlEntityConstantExpression expression)
{
ArgumentUtility.CheckNotNull ("expression", expression);
if (_currentContext == SqlExpressionContext.SingleValueRequired)
{
string message = string.Format (
"Cannot use an entity constant ('{0}' of type '{1}') in a place where SQL requires a single value.",
FormattingExpressionTreeVisitor.Format (expression),
expression.Type.Name);
throw new NotSupportedException (message);
}
return expression; // rely on VisitExpression to apply correct semantics
}