Пример #1
0
            public static IOrderedQueryable <T> ThenBy(IOrderedQueryable <T> queryable, string propertyName, bool desc)
            {
                dynamic keySelector = GetLambdaExpression(propertyName);

                return(desc ? Queryable.ThenByDescending(queryable, keySelector) : Queryable.ThenBy(queryable, keySelector));
            }
Пример #2
0
 public virtual IOrderedQueryable <TSource> ThenBy <TSource, TKey>(IOrderedQueryable <TSource> source, Expression <Func <TSource, TKey> > keySelector, IComparer <TKey> comparer)
 {
     return(Queryable.ThenBy <TSource, TKey>(source, keySelector, comparer));
 }
 public static IOrderedQueryable <TSource> ThenBy(IOrderedQueryable <TSource> source, string propertyName) => Queryable.ThenBy(source, (dynamic)CreateLambdaExpression(propertyName));
Пример #4
0
 /// <inheritdoc cref="Queryable.ThenBy{TSource, TKey}(IOrderedQueryable{TSource}, Expression{Func{TSource, TKey}}, IComparer{TKey})" />
 public static IOrderedQueryableAndAsyncQueryable <TSource> ThenBy <TSource, TKey>(this IOrderedQueryableAndAsyncQueryable <TSource> source, Expression <Func <TSource, TKey> > keySelector, IComparer <TKey> comparer)
 {
     return((IOrderedQueryableAndAsyncQueryable <TSource>)Queryable.ThenBy <TSource, TKey>(source, keySelector, comparer));
 }
Пример #5
0
 public static IOrderedAsyncQueryable <TSource> ThenBy <TSource, TKey>(this IOrderedAsyncQueryable <TSource> source, Expression <Func <TSource, TKey> > keySelector)
 {
     return((IOrderedAsyncQueryable <TSource>)Queryable.ThenBy(source, keySelector));
 }