public async Task <List <GetActiveTournamentsForUserDto> > GetActiveTournamentsForUsers(GetActiveTournamentsForUserDto activeTournaments)
        {
            var tournaments = await(from tu in _context.TournamentUsers
                                    join t in _context.Tournaments on tu.TournamentID equals t.TournamentId
                                    join u in _context.Users on t.CreatorOfTournament equals u.UserId
                                    where tu.UserID == activeTournaments.UserId && t.Active == 1
                                    select new GetActiveTournamentsForUserDto {
                UserId              = u.UserId,
                CreatorUsername     = u.Username,
                tournamentId        = t.TournamentId,
                startTime           = t.StartTime,
                endTime             = t.EndTime,
                tournamentName      = t.TournamentName,
                gameType            = t.GameType,
                creatorOfTournament = t.CreatorOfTournament,
                active              = t.Active,
                playerCount         = t.PlayerCount
            }).ToListAsync();

            return(tournaments);
        }
        public async Task <IActionResult> GetActiveTournamentsForUsers(GetActiveTournamentsForUserDto activeTournaments)
        {
            var tournaments = await _repo.GetActiveTournamentsForUsers(activeTournaments);

            return(Ok(tournaments));
        }