public ActionResult DeleteConfirmed(int id)
        {
            BACourse bACourse = db.BACourses.Find(id);

            db.BACourses.Remove(bACourse);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "BAID,DegreeID,DegreeName,DurationInYears,Courses")] BACourse bACourse)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bACourse).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DegreeID = new SelectList(db.Degrees, "DegreeID", "Degree1", bACourse.DegreeID);
     return(View(bACourse));
 }
        // GET: BachelorOfArtsCourses/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BACourse bACourse = db.BACourses.Find(id);

            if (bACourse == null)
            {
                return(HttpNotFound());
            }
            return(View(bACourse));
        }
        // GET: BachelorOfArtsCourses/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BACourse bACourse = db.BACourses.Find(id);

            if (bACourse == null)
            {
                return(HttpNotFound());
            }
            ViewBag.DegreeID = new SelectList(db.Degrees, "DegreeID", "Degree1", bACourse.DegreeID);
            return(View(bACourse));
        }