Beispiel #1
0
        public static ISelectStatement GetAs(this ISelectStatement select, ISelectItemExpression item, IColumnExpression asProperty)
        {
            ISelectItemExpression selectItem = asProperty == null ? item : new AsExpression(item, asProperty) as ISelectItemExpression;
            var list = (select.Items?.ToList() ?? new List <ISelectItemExpression>());

            list.Add(selectItem);
            select.Items = list.ToArray();
            return(select);
        }
Beispiel #2
0
 public static ISelectStatement Get(this ISelectStatement select, ISelectItemExpression item)
 {
     return(GetAs(select, item, null as IColumnExpression));
 }
Beispiel #3
0
 public static ISelectStatement GetAs(this ISelectStatement select, ISelectItemExpression item, ColumnExpression asProperty)
 {
     return(GetAs(select, item as ISelectItemExpression, asProperty as IColumnExpression));
 }