Example #1
0
 /// <summary>
 /// Performs a subsequent ordering of the elements in a sequence in descending order according to a key.
 /// </summary>
 /// <typeparam name="TSource">The type of the elements of the source.</typeparam>
 /// <param name="source">The source.</param>
 /// <param name="memberPath">The member path.</param>
 /// <returns>A <see cref="IQueryable{TSource}"/> whose elements are sorted according to the specified ordering.</returns>
 public static IOrderedQueryable <TSource> ThenByDescending <TSource>(this IOrderedQueryable <TSource> source, string memberPath)
 {
     return(source.OrderByUsing(memberPath, "ThenByDescending"));
 }
Example #2
0
 /// <summary>
 /// Performs a subsequent ordering of the elements in a sequence in ascending order according to a key.
 /// </summary>
 /// <typeparam name="TEntity">The type of the elements of the source.</typeparam>
 /// <param name="source">The source.</param>
 /// <param name="memberPath">The member path.</param>
 /// <returns>A <see cref="IQueryable{T}"/> whose elements are sorted according to the specified ordering.</returns>
 public static IOrderedQueryable <TEntity> ThenBy <TEntity>(this IOrderedQueryable <TEntity> source, string memberPath)
 {
     return(source.OrderByUsing(memberPath, "ThenBy"));
 }