public ActionResult AddComment(Guid id, string albumComment) { var album = albumrepo.AddComment(id, albumComment); var albums = AlbumModelMapping.ModelToEntity(album); return(PartialView("IndexPartial", albums)); }
public ActionResult AddComment(Guid id) { var a = albumrepo.ShowAlbum(id); var Addcomment = AlbumModelMapping.ModelToEntity(a); return(PartialView("AddComment", Addcomment)); }
public ActionResult ShowAlbum(Guid id) { var s = albumrepo.ShowAlbum(id); var show = AlbumModelMapping.ModelToEntity(s); return(PartialView("ShowAlbum", show)); }
public ActionResult AddPhotoToAlbum() { var aModel = new AlbumPhotoView(); aModel.Albums = albumrepo.GetAlbum().Select(x => AlbumModelMapping.ModelToEntity(x)).ToList(); aModel.Photos = photorepo.GetPhotos().Select(x => PhotoModelMapping.ModelToEntity(x)).ToList(); return(View(aModel)); }
public ActionResult AddNewAlbum(Album newalbum, string albumcomment) { newalbum.AlbumID = Guid.NewGuid(); newalbum.AlbumName = newalbum.AlbumName; newalbum.AlbumComments = new List <Comments> { new Comments { Id = Guid.NewGuid(), CommentOnAlbum = albumcomment } }; var albums = AlbumModelMapping.EntityToModel(newalbum); albumrepo.AddAlbum(albums); return(View(newalbum)); }
// GET: Album public ActionResult Index() { return(View(albumrepo.GetAlbum().Select(x => AlbumModelMapping.ModelToEntity(x)).ToList())); }