public RedirectToRouteResult DoRegisterToClass(RegisterToClassModel model)
        {
            var student = studentRepository.ById(model.StudentId);
            var @class = classRepository.ById(model.ClassId);

            student.RegisterTo(@class);

            return RedirectToRoute(new
            {
                controller = "Student",
                action = "Index"
            });
        }
        public ViewResult RegisterToClass(Guid studentId)
        {
            var student = studentRepository.ById(studentId);

            var model = new RegisterToClassModel()
            {
                StudentId = studentId,
                StudentName = string.Format("{0} {1}", student.FirstName, student.LastName),
                Classes = classRepository.All().ToEnumerable()
            };

            return View(model);
        }