public ActionResult Create(ClassRoster classroster)
        {
            if (ModelState.IsValid)
            {
                db.ClassRosters.Add(classroster);
                db.SaveChanges();
                return RedirectToAction("Index", "ClassSchedule");
            }

            ViewBag.ClassScheduleId = new SelectList(db.ClassSchedules, "ClassScheduleId", "ClassName");
            ViewBag.PersonId = new SelectList(db.Persons, "PersonId", "LastName", classroster.PersonId);
            return View(classroster);
        }
 public ActionResult Edit(ClassRoster classroster)
 {
     if (ModelState.IsValid)
     {
         db.Entry(classroster).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.ClassScheduleId = new SelectList(db.ClassSchedules, "ClassScheduleId", "ClassName", classroster.ClassScheduleId);
     ViewBag.PersonId = new SelectList(db.Persons, "PersonId", "LastName", classroster.PersonId);
     return View(classroster);
 }