コード例 #1
0
        public IActionResult Update(int id, Allergies allergy)
        {
            var result = _allergyService.Update(id, allergy);

            if (!result.IsSuccess)
            {
                return(BadRequest(result));
            }
            return(Ok(result));
        }
コード例 #2
0
 public ActionResult Put([FromBody] Allergy allergy)
 {
     return(Ok(
                allergyService.Update(allergy)
                ));
 }