public static SelectExpression AddRedundantSelect(this SelectExpression select, TableAlias newAlias) { var newColumns = select.Columns.Select(d => new ColumnDeclaration(d.Name, new ColumnExpression(d.Expression.Type, newAlias, d.Name))); var newFrom = new SelectExpression(newAlias, select.Columns, select.From, select.Where, select.OrderBy, select.GroupBy, select.IsDistinct, select.Skip, select.Take); return(new SelectExpression(select.Alias, newColumns, newFrom, null, null, null, false, null, null)); }
protected AliasedExpression(DbExpressionType nodeType, Type type, TableAlias alias) : base(nodeType, type) { this.alias = alias; }
public TableExpression(TableAlias alias, string name) : base(DbExpressionType.Table, typeof(void), alias) { this.name = name; }
public ColumnExpression(Type type, TableAlias alias, string name) : base(DbExpressionType.Column, type) { this.alias = alias; this.name = name; }