public IActionResult AddCourse()
 {
     ViewData["departments"] = _departmentsService
                               .GetAllDepartmentsService();
     ViewData["instructors"] = _instructorService
                               .GetInstructors();
     return(View());
 }
        public IActionResult AddStudent()
        {
            //need department list
            List <Department> departments = _departmentService
                                            .GetAllDepartmentsService()
                                            .ToList();

            ViewData["departments"] = departments;
            return(View());
        }
        public object GetDatabaseData()
        {
            int total         = 0;
            int totalFiltered = 0;
            var records       = _departmentsService.GetAllDepartmentsService();

            return(new
            {
                recordsTotal = total,
                recordsFiltered = totalFiltered,
                data = (from record in records
                        select new string[]
                {
                    record.Id.ToString(),
                    record.Name,
                    record.Id.ToString()
                }
                        ).ToArray()
            });
        }
 public List <Department> GetDepartments()
 {
     return(_departmentService
            .GetAllDepartmentsService()
            .ToList());
 }
 public IActionResult AddInstructor()
 {
     ViewData["departments"] = _departmentsService
                               .GetAllDepartmentsService();
     return(View());
 }