public ActionResult DeleteConfirmed(int id) { ImagesAlbum imagesalbum = db.ImagesAlbum.Find(id); db.ImagesAlbum.Remove(imagesalbum); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Delete(int id = 0) { ImagesAlbum imagesalbum = db.ImagesAlbum.Find(id); if (imagesalbum == null) { return(HttpNotFound()); } return(View(imagesalbum)); }
public ActionResult Edit(ImagesAlbum imagesalbum) { if (ModelState.IsValid) { db.Entry(imagesalbum).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(imagesalbum)); }
public ActionResult Create(ImagesAlbum imagesalbum) { if (ModelState.IsValid) { db.ImagesAlbum.Add(imagesalbum); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(imagesalbum)); }