Пример #1
0
        public OrderByNode <T> ParseOrderByQuery(string queryString)
        {
            try
            {
                OrderByNode <T> response = null;
                if (!string.IsNullOrEmpty(queryString))
                {
                    var queryStrings = HttpUtility.ParseQueryString(queryString);
                    if (queryStrings.HasKeys() && queryStrings.AllKeys.Contains("$orderby"))
                    {
                        string            orderby       = queryStrings["$orderby"];
                        OrderByClause <T> orderbyClause = new OrderByClause <T>();

                        response = orderbyClause.ParseOrderBy(orderby);
                    }
                }
                return(response);
            }
            catch
            {
                return(null);
            }
        }