Removing ListAll
This commit is contained in:
@@ -6,7 +6,6 @@ namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
|
|||||||
public interface IRepository<T> where T : BaseEntity
|
public interface IRepository<T> where T : BaseEntity
|
||||||
{
|
{
|
||||||
T GetSingleBySpec(ISpecification<T> spec);
|
T GetSingleBySpec(ISpecification<T> spec);
|
||||||
IEnumerable<T> ListAll();
|
|
||||||
IEnumerable<T> List(ISpecification<T> spec);
|
IEnumerable<T> List(ISpecification<T> spec);
|
||||||
T Add(T entity);
|
T Add(T entity);
|
||||||
void Update(T entity);
|
void Update(T entity);
|
||||||
|
|||||||
@@ -31,11 +31,6 @@ namespace Microsoft.eShopWeb.Infrastructure.Data
|
|||||||
return await _dbContext.Set<T>().FindAsync(id);
|
return await _dbContext.Set<T>().FindAsync(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<T> ListAll()
|
|
||||||
{
|
|
||||||
return _dbContext.Set<T>().AsEnumerable();
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<IReadOnlyList<T>> ListAllAsync()
|
public async Task<IReadOnlyList<T>> ListAllAsync()
|
||||||
{
|
{
|
||||||
return await _dbContext.Set<T>().ToListAsync();
|
return await _dbContext.Set<T>().ToListAsync();
|
||||||
|
|||||||
Reference in New Issue
Block a user