public static Task <long> LongCountAsyncLinqToDB <TSource>( this IQueryable <TSource> source, CancellationToken token = default) => AsyncExtensions.LongCountAsync(source.ToLinqToDB(), token);
public static Task <long> LongCountAsyncLinqToDB <TSource>( this IQueryable <TSource> source, Expression <Func <TSource, bool> > predicate, CancellationToken token = default) => AsyncExtensions.LongCountAsync(source.ToLinqToDB(), predicate, token);
/// <summary> /// Returns an System.Int64 that represents the number of elements in a sequence /// that satisfy a condition /// </summary> /// <typeparam name="TSource">The type of the elements of source</typeparam> /// <param name="source">An sequence that contains the elements to be counted</param> /// <param name="predicate">A function to test each element for a condition</param> /// <returns> /// The number of elements in source that satisfy the condition in the predicate /// function /// </returns> public static Task <long> LongCountAsync <TSource>(this IQueryable <TSource> source, Expression <Func <TSource, bool> > predicate = null) { return(predicate == null?AsyncExtensions.LongCountAsync(source) : AsyncExtensions.LongCountAsync(source, predicate)); }