public async Task <List <LectureInfoDto> > GetStudentLectures(int userId)
        {
            List <LectureInfoDto> lectureInfos = new List <LectureInfoDto>();
            List <UserLecture>    userLectures = await _userLectureRepository.GetStudentLecturesByUserId(userId);

            foreach (UserLecture userLecture in userLectures)
            {
                Lecture lecture = await _lectureRepository.GetLectureByCode(userLecture.lecture_code);

                User instructor = await _userRepository.GetUserById(lecture.instructor_id);

                if (lecture == null || instructor == null)
                {
                    continue;
                }
                lectureInfos.Add(new LectureInfoDto(lecture, instructor));
            }

            return(lectureInfos);
        }