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