public async Task <Game> AddPlayerToGame(Game game, string playerSessionId) { _gameDbContext.Attach(game); game.Player2 = new GameSession { Id = playerSessionId }; await _gameDbContext.SaveChangesAsync(); return(game); }