public ActionResult Edit(AwardEditViewModel _award) { if (ModelState.IsValid) { var entity = _mapper.Map <AwardsModel>(_awardManager.Get(_award.Id)); entity.Name = _award.Name; _awardManager.Update(entity); return(RedirectToAction("Index")); } return(View(_award)); }
public async Task <IActionResult> Update([FromBody] AwardModel model) { manager.Update(model); return(Ok()); }