public JsonResult GetCourse(int departmentId) { List <Course> aCourses = anCourseAssignManager.GetAllCourse(); aCourses = aCourses.FindAll(x => x.DepartmentId == departmentId).ToList(); return(Json(aCourses)); }