public ActionResult DeleteConfirmed(int id) { update_content_type update_content_type = db.update_content_type.Single(u => u.ContentTypeID == id); db.update_content_type.DeleteObject(update_content_type); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Create(update_content_type update_content_type) { if (ModelState.IsValid) { db.update_content_type.AddObject(update_content_type); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(update_content_type)); }
public ActionResult Edit(update_content_type update_content_type) { if (ModelState.IsValid) { db.update_content_type.Attach(update_content_type); db.ObjectStateManager.ChangeObjectState(update_content_type, EntityState.Modified); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(update_content_type)); }
// // GET: /Admin/UpdateContentTypes/Delete/5 public ActionResult Delete(int id) { update_content_type update_content_type = db.update_content_type.Single(u => u.ContentTypeID == id); return(View(update_content_type)); }
// // GET: /Admin/UpdateContentTypes/Details/5 public ViewResult Details(int id) { update_content_type update_content_type = db.update_content_type.Single(u => u.ContentTypeID == id); return(View(update_content_type)); }