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