public async Task <ICollection <Enrollment> > GetEnrollmentsAsync( [Service] IEnrollingServiceClient client, CancellationToken cancellationToken = default) { if (client == null) { throw new ArgumentNullException(nameof(client)); } return(await client.GetAllAsync(cancellationToken).ConfigureAwait(false)); }
public async Task <Enrollment> CreateEnrollmentAsync( EnrollmentApplicationCommand enrollment, [Service] IEnrollingServiceClient client, CancellationToken cancellationToken = default) { if (client == null) { throw new ArgumentNullException(nameof(client)); } return(await client.CreateAsync(enrollment, cancellationToken).ConfigureAwait(false)); }
public async Task <Enrollment> GetEnrollmentAsync( Guid enrollmentId, [Service] IEnrollingServiceClient client, CancellationToken cancellationToken = default) { if (client == null) { throw new ArgumentNullException(nameof(client)); } return(await client.GetByIdAsync(enrollmentId, cancellationToken) .ConfigureAwait(false)); }