protected InputFragment VisitInputExpression(DbExpression e, string name, TypeUsage type)
{
SqlFragment f = e.Accept(this);
Debug.Assert(f is InputFragment);
InputFragment inputFragment = f as InputFragment;
inputFragment.Name = name;
if (inputFragment is TableFragment && type != null)
{
(inputFragment as TableFragment).Type = type;
}
SelectStatement select = inputFragment as SelectStatement;
if (name != null)
{
if (select != null && !select.IsWrapped)
{
scope.Add(name, select.From);
}
else
{
scope.Add(name, inputFragment);
}
}
return(inputFragment);
}