public void AddOrderBy(OrderByExpression orderby) { Guard.IsNotNull(orderby, "OrderByExpression"); if (this.OrderByList == null) { this.OrderByList = new List <OrderByExpression>(); } this.OrderByList.Add(orderby); }
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()); }