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