Пример #1
0
        public ActionResult New(GameWebModel game)
        {
            if (!ModelState.IsValid)
            {
                return(View(game));
            }

            _gameService.Create(Mapper.Map <GameWebModel, GameBLModel>(game));

            return(RedirectToAction("Games"));
        }
Пример #2
0
        public ActionResult Update(GameWebModel game)
        {
            _gameService.Update(Mapper.Map <GameWebModel, GameBLModel>(game));

            return(new HttpStatusCodeResult(HttpStatusCode.OK));
        }