use cancellation tokens in many places (#2350)
* use cancellation tokens everywhere * more cancellation tokens
This commit is contained in:
@@ -8,6 +8,7 @@ public static class QueryableExtensions
|
||||
public static async Task<Option<T>> SelectOneAsync<T, TKey>(
|
||||
this IQueryable<T> enumerable,
|
||||
Expression<Func<T, TKey>> keySelector,
|
||||
Expression<Func<T, bool>> predicate) where T : class =>
|
||||
await enumerable.OrderBy(keySelector).FirstOrDefaultAsync(predicate);
|
||||
Expression<Func<T, bool>> predicate,
|
||||
CancellationToken cancellationToken) where T : class =>
|
||||
await enumerable.OrderBy(keySelector).FirstOrDefaultAsync(predicate, cancellationToken);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user