public static Task <decimal?> AverageAsyncLinqToDB( this IQueryable <decimal?> source, CancellationToken token = default) => AsyncExtensions.AverageAsync(source.ToLinqToDB(), token);
public static Task <decimal?> AverageAsyncLinqToDB <TSource>( this IQueryable <TSource> source, Expression <Func <TSource, decimal?> > selector, CancellationToken token = default) => AsyncExtensions.AverageAsync(source.ToLinqToDB(), selector, token);
/// <summary> /// Computes the average of a sequence that is obtained by /// invoking a projection function on each element of the input sequence /// </summary> /// <typeparam name="TSource">The type of the elements of source</typeparam> /// <param name="source">A sequence of values to calculate the average of</param> /// <param name="predicate">A projection function to apply to each element</param> /// <returns>The average of the sequence of values</returns> public static Task <double?> AverageAsync <TSource>(this IQueryable <TSource> source, Expression <Func <TSource, long?> > predicate) { return(AsyncExtensions.AverageAsync(source, predicate)); }