public ActionResult Edit(int? id)
        {
            var idNotNull = id ?? 0;
            if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            CourseSco courseSco = _context.CourseScos.Find(id);
            if (courseSco == null)
            {
                return HttpNotFound();
            }

            //var dropDownList = GetPreRequisitesDropDownList(id, courseSco.CourseTemplateId);

            var courseScoViewModel = new CourseScosViewModel
            {
                Title = courseSco.Title,
                CatalogueNumber = courseSco.CatalogueNumber,
                CourseId = courseSco.CourseTemplateId,
                IsFinalExam = courseSco.IsFinalExam,
                Id = idNotNull
                //,
                //PreRequisSelectListItems=dropDownList,
                //SelectedPreRequisite=courseSco.RequiredScoId.ToString(CultureInfo.InvariantCulture)
            };


            ViewBag.ScoId = new SelectList(_context.Scos, "Id", "Title", courseSco.ScoId);
            //ViewBag.RequiredScoId = new SelectList(requiredSet, "Id", "Title", courseSco.RequiredScoId,);
            return View(courseScoViewModel);
        }
        public ActionResult Edit(CourseScosViewModel courseSco)
        {
            if (ModelState.IsValid)
            {
                var originalCourseSco = _context.CourseScos.Find(courseSco.Id);
                originalCourseSco.Title = courseSco.Title;
                originalCourseSco.RequiredScoId = Convert.ToInt32(courseSco.SelectedPreRequisite);
                originalCourseSco.CatalogueNumber = courseSco.CatalogueNumber;
                originalCourseSco.IsFinalExam = courseSco.IsFinalExam;
                _context.SaveChanges();

                return RedirectToAction("Index", "ManageCourseScos", new { id = courseSco.CourseId });
            }
            ViewBag.CourseId = new SelectList(_context.Products, "Id", "Title", courseSco.CourseId);
            ViewBag.ScoId = new SelectList(_context.Scos, "Id", "Title", courseSco.ScoId);
            return View(courseSco);
        }