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