Removing ListAll
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user