public ActionResult<Burger> Edit([FromBody]Burger update, int id) { try { return Ok(_bs.Update(update)); } catch (Exception e) { return BadRequest(e.Message); } }
public ActionResult <Burger> Update(int id, [FromBody] Burger updatedBurger) { try { return(Ok(_burgersService.Update(id, updatedBurger))); } catch (System.Exception err) { return(BadRequest(err.Message)); } }