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)); } }
public static void ToggleIsDescending <T>(this ISortDescription <T> desc) { desc.IsDescending = !desc.IsDescending ?? true; }
protected override IEnumerable <ISortDescription <FileViewModel> > OrderBy(ISortDescription <FileViewModel> current) { var isNotAlias = new SortDescriptionViewModel <FileViewModel>("IsNotAlias", x => x.IsNotAlias); return(new ISortDescription <FileViewModel>[] { isNotAlias, current }); }