public IActionResult Update(int id, Allergies allergy) { var result = _allergyService.Update(id, allergy); if (!result.IsSuccess) { return(BadRequest(result)); } return(Ok(result)); }
public ActionResult Put([FromBody] Allergy allergy) { return(Ok( allergyService.Update(allergy) )); }