예제 #1
0
 public ActionResult <IEnumerable <Cat> > Get()
 {
     try{
         return(Ok(_repo.GetCats()));
     }catch (Exception e) {
         return(BadRequest(e.Message));
     }
 }
예제 #2
0
 public IActionResult Get()
 {
     return(Ok(_catsRepository.GetCats()));
 }