Пример #1
0
        public async Task <List <Models.Testimonial> > GetTestimonialAsync()
        {
            var imageSize = App.Configuration.GetImageSizeByID(ImageIdentity.TESTIMONIAL_PERSON_IMAGE);

            if (imageSize == null)
            {
                imageSize = new ImageSize();
            }
            var testimonials = await _testimonialService.GetAsync(true);

            foreach (var testimonial in testimonials)
            {
                testimonial.PersonPhotoSource =
                    _helper.GetFileUri(_helper.GetFilePath(testimonial.PersonPhoto, FileType.TestimonialPhoto),
                                       FileType.None);
                testimonial.PersonImageHeight = imageSize.Height;
                testimonial.PersonImageWidth  = imageSize.Width;
            }

            this.Testimonials = testimonials.OrderBy(t => t.DisplaySequence).ToList();
            return(this.Testimonials);
        }