public async Task <IActionResult> OnGetAsync(Guid id)
        {
            Instructor = await _instructorRepository.GetInstructorAsync(id);

            if (Instructor == null)
            {
                return(NotFound());
            }

            CourseAssignments = new CourseAssignmentViewModel()
            {
                InstructorId = id
            };

            var assignedCourses = await _instructorRepository.GetAssignedCourseData(id);

            var allCourses = await _courseRepository.GetCoursesAndDepartmentsAsync();

            var checkBoxListItems = allCourses
                                    .Select(course => new CheckBoxListItem
            {
                Id        = course.Id,
                Display   = course.Title,
                IsChecked = assignedCourses.Any(x => x.CourseId == course.Id)
            }).ToList();

            CourseAssignments.AssignedCourses = checkBoxListItems;

            return(Page());
        }