public ActionResult AddPhotoToAlbum() { var model = new ViewAlbumPhoto(); model.Photos = GalleryController.photos; model.Albums = AlbumController.albums; return(View(model)); }
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)); }