public ActionResult DeleteConfirmed(int id)
        {
            Corequisites corequisites = db.Corequisites.Find(id);

            db.Corequisites.Remove(corequisites);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "CorequisiteID,CourseID,RequiredCourseID")] Corequisites corequisites)
 {
     if (ModelState.IsValid)
     {
         db.Entry(corequisites).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CourseID         = new SelectList(db.Courses, "CourseID", "CourseName", corequisites.CourseID);
     ViewBag.RequiredCourseID = new SelectList(db.Courses, "CourseID", "CourseName", corequisites.RequiredCourseID);
     return(View(corequisites));
 }
        // GET: Corequisites/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Corequisites corequisites = db.Corequisites.Find(id);

            if (corequisites == null)
            {
                return(HttpNotFound());
            }
            return(View(corequisites));
        }
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Corequisites corequisites = db.Corequisites.Find(id);

            if (corequisites == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CourseID         = new SelectList(db.Courses, "CourseID", "CourseName", corequisites.CourseID);
            ViewBag.RequiredCourseID = new SelectList(db.Courses, "CourseID", "CourseName", corequisites.RequiredCourseID);
            return(View(corequisites));
        }