public IActionResult Post(CreateAccomplishmentViewModel model) { if (ModelState.IsValid) { if (_accomplishment.CreateAccomplishment(model)) { return(Ok()); } } return(BadRequest()); }
public IActionResult CreateAccomplishment([FromForm] CreateAccomplishmentViewModel model, int id) { if (ModelState.IsValid) { model.PersonId = id; if (_accomplishment.CreateAccomplishment(model)) { return(RedirectToAction("List")); } } return(View(model)); }