Exemplo n.º 1
0
        public static Album GetById(int albumId)
        {
            var pathGalleryPhoto           = ConfigurationManager.AppSettings["pathGalleryPhoto"];
            IGalleryRepository galleryRepo = new GalleryRepository();
            var album = galleryRepo.GetById(albumId);

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