public void AddNewGame(AddNewGameBindingModel model) { Game game = Mapper.Map <Game>(model); this.Context.Games.Add(game); this.Context.SaveChanges(); }
public IActionResult Add(HttpResponse response, HttpSession session, AddNewGameBindingModel model) { new GameService().AddNewGame(model); this.Redirect(response, "/users/home"); return(null); }