public CarouselViewModel GetFeaturedNow() { IQueryable <FeaturedContent> allModels = featuredContentDomainService.GetFeaturedNow(); if (allModels.Any()) { IEnumerable <FeaturedContentViewModel> vms = allModels.ProjectTo <FeaturedContentViewModel>(mapper.ConfigurationProvider); CarouselViewModel model = new CarouselViewModel { Items = vms.OrderByDescending(x => x.CreateDate).ToList() }; foreach (FeaturedContentViewModel vm in model.Items) { string[] imageSplit = vm.ImageUrl.Split("/"); Guid userId = vm.OriginalUserId == Guid.Empty ? vm.UserId : vm.OriginalUserId; vm.FeaturedImage = ContentHelper.SetFeaturedImage(userId, imageSplit.Last(), ImageRenderType.Full); vm.FeaturedImageLquip = ContentHelper.SetFeaturedImage(userId, imageSplit.Last(), ImageRenderType.LowQuality); } return(model); } else { CarouselViewModel fake = FakeData.FakeCarousel(); return(fake); } }