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