示例#1
0
        public Query <T> OrderByDescending <TKey>(Expression <Func <T, TKey> > keySelector)
        {
            Sortings.Add(new Sorting
            {
                PropertyName = GetPropertyPath(keySelector),
                Direction    = SortDirection.Descending
            });

            return(this);
        }
示例#2
0
        public Query <T> OrderBy(string propertyName)
        {
            Sortings.Add(new Sorting
            {
                PropertyName = propertyName,
                Direction    = SortDirection.Ascending
            });

            return(this);
        }
示例#3
0
 private void FillSorts(HtmlNodeCollection sorts)
 {
     foreach (var sort in sorts)
     {
         var aTag = sort.FirstChild;
         var text = aTag.InnerText;
         var attr = HttpUtility.UrlEncode(aTag.GetAttributeValue("value", string.Empty));
         Sortings.Add(text, attr);
     }
 }
示例#4
0
        public LinqToSolrQuery AddSorting(Expression field, SolrSortTypes order)
        {
            Sortings.Add(LinqToSolrSort.Create(field, order));

            return(this);
        }