public IActionResult AccomplishmentEdit([FromForm] AccomplishmentViewModel model, int id) { if (model.Id == id && ModelState.IsValid) { model = _accomplishment.UpdateAccomplishmnet(model); } return(RedirectToAction("List")); }
public IActionResult Put(AccomplishmentViewModel model) { if (ModelState.IsValid) { var result = _accomplishment.UpdateAccomplishmnet(model); return(Ok(result)); } return(BadRequest()); }