Service layer for course student registration
you can write fluent extension methods:
 public static class Extensions {
     public static T EnsureNotNull&lt;T&gt;(this T t, string message = null) {
         if (t == null) throw new StudentCourseValidationException(message ?? &quot;Value not found&quot;);
         return t;
     }
     public static Student EnsureAlreadyRegistered(this Student student, string courseId) {
          if (student.Enrollments.Any(x =&gt; x.CourseId == courseId) throw new StudentCourseRegistrationException(&quot;Student is Already Registered for Course&quot;);
          return student;
      }
      //and so on
 }

then your code would look like:
public async Task&lt;bool&gt; RegisterStudentForCourseAsync(RegisterStudentForCourseRequest registerStudent)
    {
        var student = await _studentRepository.GetStudentInformationAsync(registerStudent.StudentId);

        student
              .EnsureNotNull()
              .EnsureNotAlreadyRegistered(registerStudent.CourdeId)
              .EnsureCanHaveMoreCourses();
        
        var course = _courseRepository.GetCourseInformation(registerStudent.CourseId);

        course
             .EnsureNotNull()
             .EnsureNotFullyBooked();

        return await _courseRepository.SaveRegisterationOfStudentForCourse(course, registerStudent, student);
    }
}