Creates a reference to the given expression stemming from a ResolvedSubStatementTableInfo. References can only be made to expressions with names. Expressions without names will be copied (but their child expressions resolved). For example, a NamedExpression is referenced via a SqlColumnExpression; but a NewExpression is referenced by an equivalent NewExpression (whose arguments reference the arguments of the original NewExpression).
Inheritance: System.Linq.Expressions.ExpressionTreeVisitor, IResolvedSqlExpressionVisitor, INamedExpressionVisitor, ISqlGroupingSelectExpressionVisitor
    public static Expression ResolveSubStatementReferenceExpression (
        Expression referencedExpression,
        ResolvedSubStatementTableInfo containingSubStatementTableInfo,
        SqlTableBase containingSqlTable,
        IMappingResolutionContext context)
    {
      ArgumentUtility.CheckNotNull ("referencedExpression", referencedExpression);
      ArgumentUtility.CheckNotNull ("containingSubStatementTableInfo", containingSubStatementTableInfo);
      ArgumentUtility.CheckNotNull ("containingSqlTable", containingSqlTable);
      
      var visitor = new SubStatementReferenceResolver (containingSubStatementTableInfo, containingSqlTable, context);
      var result = visitor.VisitExpression (referencedExpression);

      return result;
    }
        public static Expression ResolveSubStatementReferenceExpression(
            Expression referencedExpression,
            ResolvedSubStatementTableInfo containingSubStatementTableInfo,
            SqlTableBase containingSqlTable,
            IMappingResolutionContext context)
        {
            ArgumentUtility.CheckNotNull("referencedExpression", referencedExpression);
            ArgumentUtility.CheckNotNull("containingSubStatementTableInfo", containingSubStatementTableInfo);
            ArgumentUtility.CheckNotNull("containingSqlTable", containingSqlTable);

            var visitor = new SubStatementReferenceResolver(containingSubStatementTableInfo, containingSqlTable, context);
            var result  = visitor.VisitExpression(referencedExpression);

            return(result);
        }