Beispiel #1
0
 public static async Task <IReadOnlyCollection <T> > FindByListOfKeysAsync <T, TKey>(
     this IQueryableRepository <T> source,
     IEnumerable <TKey> keys,
     CancellationToken cancellationToken = default) where T : IKey <TKey> where TKey : IEquatable <TKey>
 {
     cancellationToken.ThrowIfCancellationRequested();
     return(await source.ProcessQueryAsync(
                source.AsQueryable()
                .Where(item => keys.Contains(item.Id)), cancellationToken));
 }