public async Task Enlist(string code) { var gamespace = await _gamespaceStore.FindByShareCode(code); if (gamespace == null) { throw new InvalidOperationException(); } if (!gamespace.Players.Where(m => m.PersonId == User.Id).Any()) { gamespace.Players.Add(new Data.Player { PersonId = User.Id, }); await _gamespaceStore.Update(gamespace); } }