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