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

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

            return(this);
        }
Beispiel #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);
     }
 }
        public LinqToSolrQuery AddSorting(Expression field, SolrSortTypes order)
        {
            Sortings.Add(LinqToSolrSort.Create(field, order));

            return(this);
        }