Exemplo n.º 1
0
 public static IOrderedQueryable <T> ThenBy <T>(this ISortDescription <T> desc, IOrderedQueryable <T> source)
 {
     if (desc.IsDescending == true)
     {
         return(source.ThenByDescending(desc.SortExpression));
     }
     else
     {
         return(source.ThenBy(desc.SortExpression));
     }
 }
Exemplo n.º 2
0
 public static void ToggleIsDescending <T>(this ISortDescription <T> desc)
 {
     desc.IsDescending = !desc.IsDescending ?? true;
 }
Exemplo n.º 3
0
        protected override IEnumerable <ISortDescription <FileViewModel> > OrderBy(ISortDescription <FileViewModel> current)
        {
            var isNotAlias = new SortDescriptionViewModel <FileViewModel>("IsNotAlias", x => x.IsNotAlias);

            return(new ISortDescription <FileViewModel>[] { isNotAlias, current });
        }