Пример #1
0
        public static Album GetByURL(string url)
        {
            var pathGalleryPhoto           = ConfigurationManager.AppSettings["pathGalleryPhoto"];
            IGalleryRepository galleryRepo = new GalleryRepository();
            var album = galleryRepo.GetByURL(url);

            if (album == null)
            {
                throw new NotFoundException("Альбом не найден", "");
            }
            foreach (var photo in album.Photos)
            {
                photo.Path = pathGalleryPhoto + photo.Path;
            }
            return(album);
        }