public IActionResult Index() { GameDataBusinessService gameData = new GameDataBusinessService(); //Grab userID from session int userID = (int)HttpContext.Session.GetInt32("userID"); return(View(gameData.AllGamesForUser(userID))); }
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))); }