public ActionResult <Recipe> Edit([FromBody] Recipe updated, int id) { try { updated.Id = id; return(Ok(_rs.Edit(updated))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <Recipe> Edit([FromBody] Recipe editRecipe, int id) { try { editRecipe.Id = id; return(Ok(_service.Edit(editRecipe))); } catch (System.Exception e) { return(BadRequest(e.Message)); } }