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