[HttpGet] //GetAll
 public ActionResult <IEnumerable <Burger> > Get()
 {
     try
     {
         return(Ok(_service.Get()));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Пример #2
0
 public ActionResult <IEnumerable <Burger> > GetAll() //<> - Of type, IEnumerable - list
 {
     try {
         return(Ok(_service.Get()));
     } catch (Exception e) {
         return(BadRequest(e.Message));
     }
 }