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