public ActionResult <Burger> Edit([FromBody] Burger newBurger, int id) { try { return(Ok(_burgerService.Edit(newBurger, id))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <Burger> Edit(int id, [FromBody] Burger update) { try { update.Id = id; return(Ok(_bs.Edit(update))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <Burger> Edit([FromBody] Burger editedBurger, int burgerId) { try { editedBurger.Id = burgerId; return(Ok(_burgersService.Edit(editedBurger))); } catch (System.Exception err) { return(BadRequest(err.Message)); } }
public ActionResult <Burger> Edit(string id, [FromBody] Burger newBurgerData) { try { newBurgerData.Id = id; return(Ok(_bs.Edit(newBurgerData))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <string> UpdateBurger([FromBody] Burger updated, int id) { try { updated.Id = id; Burger burger = _ds.Edit(updated); return(Ok(burger)); } catch (System.Exception err) { return(BadRequest(err.Message)); } }