Browse Source

Removing ListAll

main
Eric Fleming 7 years ago
parent
commit
b8f1ac977d
  1. 1
      src/ApplicationCore/Interfaces/IRepository.cs
  2. 5
      src/Infrastructure/Data/EfRepository.cs

1
src/ApplicationCore/Interfaces/IRepository.cs

@ -6,7 +6,6 @@ namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
public interface IRepository<T> where T : BaseEntity
{
T GetSingleBySpec(ISpecification<T> spec);
IEnumerable<T> ListAll();
IEnumerable<T> List(ISpecification<T> spec);
T Add(T entity);
void Update(T entity);

5
src/Infrastructure/Data/EfRepository.cs

@ -31,11 +31,6 @@ namespace Microsoft.eShopWeb.Infrastructure.Data
return await _dbContext.Set<T>().FindAsync(id);
}
public IEnumerable<T> ListAll()
{
return _dbContext.Set<T>().AsEnumerable();
}
public async Task<IReadOnlyList<T>> ListAllAsync()
{
return await _dbContext.Set<T>().ToListAsync();

Loading…
Cancel
Save