public IActionResult Index() { OperationResultListVo <RankingViewModel> serviceResult = gamificationAppService.GetAll(); List <RankingViewModel> objs = serviceResult.Value.ToList(); foreach (RankingViewModel obj in objs) { Application.ViewModels.User.ProfileViewModel profile = profileAppService.GetUserProfileWithCache(obj.UserId); if (profile != null) { obj.Name = profile.Name; obj.ProfileImageUrl = UrlFormatter.ProfileImage(obj.UserId); obj.CoverImageUrl = UrlFormatter.ProfileCoverImage(obj.UserId, profile.Id, profile.LastUpdateDate, profile.HasCoverImage); } } return(View(objs)); }