Method ThenBy
ThenBy<TSource, TKey>(IOrderedMongoQueryable<TSource>, Expression<Func<TSource, TKey>>)
Performs a subsequent ordering of the elements in a sequence in ascending order according to a key.
public static IOrderedMongoQueryable<TSource> ThenBy<TSource, TKey>(this IOrderedMongoQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
Parameters
sourceIOrderedMongoQueryable<TSource>A sequence of values to order.
keySelectorExpression<Func<TSource, TKey>>A function to extract a key from an element.
Returns
- IOrderedMongoQueryable<TSource>
An IOrderedMongoQueryable<T> whose elements are sorted according to a key.
Type Parameters
TSourceThe type of the elements of
source.TKeyThe type of the key returned by the function that is represented by keySelector.