public ActionResult DeleteConfirmed(int id) { verse_category verse_category = db.verse_category.Find(id); db.verse_category.Remove(verse_category); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "verse_category_id,verse_category_description,verse_category_name,active,text_color_name,text_color_code,text_size,text_bold,background_color_name,background_color_code,css_class_name,user_id")] verse_category verse_category) { if (ModelState.IsValid) { db.Entry(verse_category).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(verse_category)); }
// GET: verse_category/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } verse_category verse_category = db.verse_category.Find(id); if (verse_category == null) { return(HttpNotFound()); } return(View(verse_category)); }