Ejemplo n.º 1
0
 public IQueryable <TEntity> GetAll()
 {
     try
     {
         return(_context.Set <TEntity>());
     }
     catch (Exception ex)
     {
         throw new Exception($"Couldn't retrieve entities: {ex.Message}");
     }
 }
 public async Task <IEnumerable <T> > GetAllAsync()
 {
     return(await _context.Set <T>().ToListAsync());
 }