Пример #1
0
 public void AddOrderBy(OrderByExpression orderby)
 {
     Guard.IsNotNull(orderby, "OrderByExpression");
     if (this.OrderByList == null)
     {
         this.OrderByList = new List <OrderByExpression>();
     }
     this.OrderByList.Add(orderby);
 }
Пример #2
0
        public string TranslateOrderyBy(OrderByExpression exp)
        {
            if (exp.Field == null)
            {
                return("");
            }
            StringBuilder str = new StringBuilder();

            str.Append(exp.Field.FieldNameWithTable);
            str.Append(" " + (exp.Direction == OrderByDirection.Asc ? SQL_ORDERBY_ASC : SQL_ORDERBY_DESC));
            return(str.ToString());
        }