public static IOrderedQueryable <TSource> ThenByPropAndDirection(IOrderedQueryable <TSource> source, OrderByProperty property)
 {
     return(property.IsAscending ?
            PropertyCache <TSource, IQueryable <TSource>, IOrderedQueryable <TSource> > .ThenBy(source, property.PropertyName) :
            PropertyCache <TSource, IQueryable <TSource>, IOrderedQueryable <TSource> > .ThenByDescending(source, property.PropertyName));
 }
 public static IOrderedEnumerable <TSource> OrderByPropAndDirection(IEnumerable <TSource> source, OrderByProperty property)
 {
     return(property.IsAscending ?
            PropertyCache <TSource, IEnumerable <TSource>, IOrderedEnumerable <TSource> > .OrderBy(source, property.PropertyName) :
            PropertyCache <TSource, IEnumerable <TSource>, IOrderedEnumerable <TSource> > .OrderByDescending(source, property.PropertyName));
 }