refactor DbCourseRepository to simplify findBySubjectId