예제 #1
0
        public IActionResult Index()
        {
            GameDataBusinessService gameData = new GameDataBusinessService();
            //Grab userID from session
            int userID = (int)HttpContext.Session.GetInt32("userID");

            return(View(gameData.AllGamesForUser(userID)));
        }
예제 #2
0
        public IActionResult Delete(int gameStateID)
        {
            GameDataBusinessService gameData = new GameDataBusinessService();

            gameData.DeleteSave(gameStateID);
            int userID = (int)HttpContext.Session.GetInt32("userID");

            return(View("Index", gameData.AllGamesForUser(userID)));
        }