Esempio n. 1
0
        public ActionResult Edit(EditGameViewModel editGameViewModel)
        {
            var editGameModel = _gameMapper.MapViewModelToModel(editGameViewModel);

            _gameService.SaveEditGameModel(editGameModel);

            return RedirectToAction("Index");
        }
Esempio n. 2
0
 public EditGameModel MapViewModelToModel(EditGameViewModel editGameViewModel)
 {
     return new EditGameModel
     {
         GameId = editGameViewModel.GameId,
         HomeTeamId = editGameViewModel.HomeTeamId,
         AwayTeamId = editGameViewModel.AwayTeamId,
         HomeScore = editGameViewModel.HomeScore,
         AwayScore = editGameViewModel.AwayScore,
         GameDate = editGameViewModel.GameDate,
         FixtureTime = editGameViewModel.FixtureTime
     };
 }