public static IOrderedQueryable <T> OrderBy <T>(this IQueryable <T> query, IOrderSpecification <T> specification)
 {
     if (specification == null)
     {
         throw new ArgumentNullException(nameof(specification));
     }
     return(specification.Invoke(query));
 }
예제 #2
0
 public static IOrderedEnumerable <T> ThenBy <T>(this IOrderedEnumerable <T> query, IOrderSpecification <T> specification)
 {
     return(specification == null
                ? throw new ArgumentNullException(nameof(specification))
                : specification.Invoke(query));
 }