public ActionResult OnGetGame(int game_id) { GameModel partialGame = new GameModel(); partialGame.Id = game_id; GameBusinessService bs = new GameBusinessService(); game = bs.getGame(partialGame); return(View("~/Views/Game/Board.cshtml", game)); }
// GET: Game public ActionResult Index() { AccountBusinessService accountBS = new AccountBusinessService(); GameBusinessService gameBS = new GameBusinessService(); int userActiveGameId = accountBS.getUser(Int32.Parse(Session["user_id"].ToString())).ActiveGameId; if (userActiveGameId != -1) { GameModel partialGame = new GameModel(); partialGame.Id = userActiveGameId; GameBusinessService bs = new GameBusinessService(); game = bs.getGame(partialGame); return(View("~/Views/Game/Board.cshtml", game)); } return(View("Index")); }