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