add CancellationToken to GetAllAsync
This commit is contained in:
parent
63c97b4dc7
commit
56b467ddfc
@ -23,8 +23,8 @@ public static class Extensions
|
||||
public static IEnumerable<TEntity> GetAll<TEntity>(this IRepository repository) where TEntity : IEntity
|
||||
=> repository.Entity<TEntity>().GetAll();
|
||||
|
||||
public static Task<IEnumerable<TEntity>> GetAllAsync<TEntity>(this IRepository repository) where TEntity : IEntity
|
||||
=> repository.Entity<TEntity>().GetAllAsync();
|
||||
public static Task<IEnumerable<TEntity>> GetAllAsync<TEntity>(this IRepository repository, CancellationToken cancel = default) where TEntity : IEntity
|
||||
=> repository.Entity<TEntity>().GetAllAsync(cancel);
|
||||
|
||||
public static IQueryable<TEntity> Where<TEntity>(this IRepository repository, Expression<Func<TEntity, bool>> expression)
|
||||
where TEntity : IEntity
|
||||
|
||||
@ -15,7 +15,7 @@ public interface IRepository<TEntity>
|
||||
|
||||
public IEnumerable<TEntity> GetAll();
|
||||
|
||||
public Task<IEnumerable<TEntity>> GetAllAsync();
|
||||
public Task<IEnumerable<TEntity>> GetAllAsync(CancellationToken cancel = default);
|
||||
|
||||
public Task UpdateAsync<TDto>(TDto dto, Expression<Func<TEntity, bool>> expression, CancellationToken cancel = default);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user