public ActionResult <Burger> Get(string id)
 {
     try {
         return(Ok(_service.GetById(id)));
     } catch (Exception e) {
         return(BadRequest(e));
     }
 }
Esempio n. 2
0
 public ActionResult <Burger> GetById(int id)
 {
     try
     {
         return(Ok(_bs.GetById(id)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err));
     }
 }
 public ActionResult <IEnumerable <Burger> > GetById(int id)
 {
     try
     {
         return(Ok(_bs.GetById(id)));
     }
     catch (System.Exception e)
     {
         return(BadRequest(e.Message));
     }
 }