public async Task <IActionResult> GetLeagues() { var leagues = leagueRepository.GetLeagues(); var leaguesToReturn = mapper.Map <IEnumerable <LeagueForListDto> >(leagues); foreach (var l in leagues.Zip(leaguesToReturn, Tuple.Create)) { //temporary solution l.Item2.UserCount = await leagueRepository.CountUsers(l.Item1.Id); } return(Ok(leaguesToReturn)); }