public ViewResult Create(Course course)
        {
            CourseViewModel viewModel = new CourseViewModel
            {
                Departments = DepartmentGateway.GetAllDepartments(),
                Semesters   = SemesterGateway.GetAllSemseters()
            };

            if (!ModelState.IsValid)
            {
                viewModel.Course = course;
                return(View(viewModel));
            }

            int rowAffected = CourseGateway.Save(course);

            if (rowAffected > 0)
            {
                ViewBag.message  = "Course Saved";
                viewModel.Course = new Course();
                return(View(viewModel));
            }

            return(View("~/Views/Shared/BadRequest.cshtml"));
        }
        // GET: Course/Create
        public ViewResult Create()
        {
            CourseViewModel viewModel = new CourseViewModel
            {
                Departments = DepartmentGateway.GetAllDepartments(),
                Semesters   = SemesterGateway.GetAllSemseters()
            };

            return(View(viewModel));
        }