public async Task <IEnumerable <DiagnosisResource> > GetAllAsync([FromQuery] int pageSize, [FromQuery] int pageFirstIndex, [FromQuery] string searchVal) { var diagnoses = await _diagnosisService.ListAsync(pageSize, pageFirstIndex, searchVal); var resources = _mapper.Map <IEnumerable <Diagnosis>, IEnumerable <DiagnosisResource> >(diagnoses); return(resources); }