public async Task <IEnumerable <GetAllApplicantsDto> > Handle(GetAllApplicantsQuery request, CancellationToken cancellationToken)
            {
                var applicants = await _applicantsApi.GetAllApplicants();

                return(_mapper.Map <IEnumerable <GetAllApplicantsDto> >(applicants));
            }
Ejemplo n.º 2
0
 /// <summary>
 /// Handle method to get request and response accordingly.
 /// <param name="request"> Applicants query request </param>
 /// /// <param name="cancellationToken"> Pass cancellation token </param>
 /// <returns>Returns the list of applicants</returns>
 /// </summary>
 public async Task <List <Applicant> > Handle(GetAllApplicantsQuery request, CancellationToken cancellationToken)
 {
     return(await _repository.GetAll().ToListAsync(cancellationToken: cancellationToken));
 }