Example #1
0
        private bool AddParticipantToTable(int tableId)
        {
            List <GameTable> gameTableList = GameRepository.Instance.Get();
            GameTable        gameTable     = gameTableList?.Find(table => table.Identifier.Equals(tableId));

            if (ParticipationService.IsAlreadyParticipating(gameTable, User.Identity.Name))
            {
                return(true);
            }
            return(ParticipationService.AddParticipation(gameTable, User.Identity.Name));
        }