Пример #1
0
 public IEnumerable <Cat> GetAll()
 {
     try
     {
         return(_catRepository.GetAll());
     }
     catch (Exception ex)
     {
         _logger.LogError(ex.Message);
         throw;
     }
 }
Пример #2
0
 public dynamic Get()
 {
     return(catRepo.GetAll().Select(o => new { o.ID, o.Name }));
 }
 public async Task <IActionResult> GetAll()
 {
     return(Ok(await _repository.GetAll()));
 }