示例#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));
     }
 }
示例#2
0
 public static void ToggleIsDescending <T>(this ISortDescription <T> desc)
 {
     desc.IsDescending = !desc.IsDescending ?? true;
 }
示例#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 });
        }