public ActionResult DeleteConfirmed(int id) { Bookimage bookimage = db.Bookimage.Find(id); db.Bookimage.Remove(bookimage); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "userID,ISBN,imgPath")] Bookimage bookimage) { if (ModelState.IsValid) { db.Entry(bookimage).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bookimage)); }
public ActionResult Create([Bind(Include = "userID,ISBN,imgPath")] Bookimage bookimage) { if (ModelState.IsValid) { db.Bookimage.Add(bookimage); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bookimage)); }
// GET: Bookimages/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Bookimage bookimage = db.Bookimage.Find(id); if (bookimage == null) { return(HttpNotFound()); } return(View(bookimage)); }