예제 #1
0
        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));
        }
예제 #2
0
        public async Task <IActionResult> Update([FromBody] AwardModel model)
        {
            manager.Update(model);

            return(Ok());
        }