Пример #1
0
        public ActionResult AddPhotoToAlbum()
        {
            var model = new ViewAlbumPhoto();

            model.Photos = GalleryController.photos;
            model.Albums = AlbumController.albums;
            return(View(model));
        }
Пример #2
0
        public ActionResult AddPhotoToAlbum()
        {
            var model = new ViewAlbumPhoto();

            model.Albums = albumrepo.GetAllAlbums().Select(x => AlbumModelMapper.ModelToEntity(x)).ToList();
            model.Photos = photorepo.GetAllPhoto().Select(x => PhotoModelMapper.ModelToEntity(x)).ToList();
            //var model = new ViewAlbumPhoto();
            //model.Photos = GalleryController.photos;
            //model.Albums = AlbumController.albums;
            return(View(model));
        }