diff --git a/src/ApplicationCore/Interfaces/IRepository.cs b/src/ApplicationCore/Interfaces/IRepository.cs index 595c164..ba65c55 100644 --- a/src/ApplicationCore/Interfaces/IRepository.cs +++ b/src/ApplicationCore/Interfaces/IRepository.cs @@ -6,7 +6,6 @@ namespace Microsoft.eShopWeb.ApplicationCore.Interfaces public interface IRepository where T : BaseEntity { T GetSingleBySpec(ISpecification spec); - IEnumerable ListAll(); IEnumerable List(ISpecification spec); T Add(T entity); void Update(T entity); diff --git a/src/Infrastructure/Data/EfRepository.cs b/src/Infrastructure/Data/EfRepository.cs index 35b8802..7373656 100644 --- a/src/Infrastructure/Data/EfRepository.cs +++ b/src/Infrastructure/Data/EfRepository.cs @@ -30,12 +30,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data { return await _dbContext.Set().FindAsync(id); } - - public IEnumerable ListAll() - { - return _dbContext.Set().AsEnumerable(); - } - + public async Task> ListAllAsync() { return await _dbContext.Set().ToListAsync();