public async Task <List <DemographyReport> > UserReport() { int rowCount = 1; Dictionary <long, int> ProfilesWithCount = await _ReportRepository.GetAllProfileIDWithCount(); Dictionary <long, int> ProfilesWithCountFromGrpMemShip = await _ReportRepository.GetAllProfileIDWithCountFromGrpMemShip(); Dictionary <long, long> ProfileIDsWithUserIDs = await _ReportRepository.GetAllProfileIDWithUserID(); Dictionary <long, string> UserIDsWithAttributes = await _ReportRepository.GetAllUserIDWithAttributes(); IEnumerable <DemographyReport> demographyReports = from p in UserIDsWithAttributes join q in ProfileIDsWithUserIDs on p.Key equals q.Value join r in ProfilesWithCount on q.Key equals r.Key join s in ProfilesWithCountFromGrpMemShip on q.Key equals s.Key select new DemographyReport { SNo = rowCount++, UserName = p.Value.Split(',')[0], BuddiesCount = r.Value, GroupCount = s.Value, FacebookLinked = p.Value.Split(',')[3] != null ? "Yes" : "No" }; return(demographyReports.ToList()); }