public static Task <TResult> MaxAsyncLinqToDB <TSource, TResult>(
     this IQueryable <TSource> source,
     Expression <Func <TSource, TResult> > selector,
     CancellationToken token = default)
 => AsyncExtensions.MaxAsync(source.ToLinqToDB(), selector, token);
 /// <summary>
 /// Invokes a projection function on each element of a generic sequence
 /// and returns the maximum resulting value
 /// </summary>
 /// <typeparam name="TSource">The type of the elements of source</typeparam>
 /// <typeparam name="TResult">The type of the value returned by the function represented by selector</typeparam>
 /// <param name="source">A sequence of values to determine the maximum of</param>
 /// <param name="predicate">A projection function to apply to each element</param>
 /// <returns>The maximum value in the sequence</returns>
 public static Task <TResult> MaxAsync <TSource, TResult>(this IQueryable <TSource> source,
                                                          Expression <Func <TSource, TResult> > predicate)
 {
     return(AsyncExtensions.MaxAsync(source, predicate));
 }
 public static Task <TSource> MaxAsyncLinqToDB <TSource>(
     this IQueryable <TSource> source,
     CancellationToken token = default)
 => AsyncExtensions.MaxAsync(source.ToLinqToDB(), token);
 /// <summary>
 /// Returns the maximum value in a generic sequence
 /// </summary>
 /// <typeparam name="TSource">The type of the elements of source</typeparam>
 /// <param name="source">A sequence of values to determine the maximum of</param>
 /// <returns>The maximum value in the sequence</returns>
 public static Task <TSource> MaxAsync <TSource>(this IQueryable <TSource> source)
 {
     return(AsyncExtensions.MaxAsync(source));
 }