/// <summary> /// Asynchronously apply provided action to each element in source sequence. /// Sequence elements processed sequentially. /// </summary> /// <typeparam name="TSource">Source sequence element type.</typeparam> /// <param name="source">Source sequence.</param> /// <param name="action">Action to apply to each sequence element.</param> /// <param name="token">Optional asynchronous operation cancellation token.</param> /// <returns>Asynchronous operation completion task.</returns> public static Task ForEachAsyncLinqToDB <TSource>( this IQueryable <TSource> source, Action <TSource> action, CancellationToken token = default) => AsyncExtensions.ForEachAsync(source.ToLinqToDB(), action, token);