Removing ListAll

This commit is contained in:
Eric Fleming
2019-03-01 21:46:48 -05:00
parent 058d4e6f5a
commit b8f1ac977d
2 changed files with 1 additions and 7 deletions

View File

@@ -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);

View File

@@ -30,12 +30,7 @@ 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();