public static StringBuilder BuildOrderField <T>(OrderFieldStore <T> orderFieldStore) where T : class
        {
            StringBuilder sqlCommand = new StringBuilder();
            bool          ordered    = false;

            foreach (OrderField <T> orderField in orderFieldStore.OrderFields)
            {
                string orderType = string.Empty;
                if (orderField.OrderType == OrderType.Descending)
                {
                    orderType = "DESC";
                }
                else if (orderField.OrderType == OrderType.Ascending)
                {
                    orderType = "ASC";
                }

                if (!string.IsNullOrEmpty(orderType))
                {
                    sqlCommand.Append(ordered ? "," : "ORDER BY ");

                    string sortField = orderField.OrderKey;
                    sqlCommand.Append(sortField + " " + orderType);

                    ordered = true;
                }
            }
            return(sqlCommand);
        }
 public OrderPagingQuery()
 {
     OrderFieldStore = new OrderFieldStore <TModel>();
 }