public ActionResult <Burger> Edit([FromBody] Burger editBurger, int id) // req.params.id { try { editBurger.Id = id; return(Ok(_service.Edit(editBurger))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <Burger> Edit(int id, [FromBody] Burger editedBurger) { try { return(Ok(_bs.Edit(id, editedBurger))); } catch (System.Exception err) { return(BadRequest(err)); } }
public ActionResult <IEnumerable <Burger> > Edit([FromBody] Burger editedBurger, int id) { try { return(Ok(_bs.Edit(editedBurger, id))); } catch (System.Exception error) { return(BadRequest(error.Message)); } }