//Interest PhotoGrapher List public IEnumerable <JobsInterestedListViewModel> GetAllInterest(int PostId) { // var InterestList_PhotoGrapher = Db.Set<JobsInterested>().Where(x=>x.FkJobsPostId == PostId).ToList(); // return InterestList_PhotoGrapher; PhotoGrapherSocialService socialservice = new PhotoGrapherSocialService(); PhotoGrapherServices pt = new PhotoGrapherServices(); List <PhotoGrapher> pht = Db.PhotoGraphers.ToList(); List <JobsInterested> interest = Db.JobsInteresteds.ToList(); var data = (from p in pht join j in interest on p.PhotoGrapherId equals j.PhotoGrapherId // where j.FkJobsPostId == PostId select new JobsInterestedListViewModel { photographer = p, jobinterest = j, //here function call total follower get by photographerid follower = socialservice.TotalFollowers(p.PhotoGrapherId), //here function call ratting get photographer ratting = socialservice.TotalRatting(p.PhotoGrapherId), //get current profile picture profilepicture = pt.CurrentProfilePicture(p.PhotoGrapherId) }).ToList(); return(data); }