public async Task <IList <EmployeeDiseaseRiskStatus> > MapEmployeesDiseaseRiskStatusAsync(Guid clientId, IList <EmployeeDiseaseRiskStatusRecord> employeeDiseaseRiskStatusRiskStatusRecords) { var clientDiseaseRiskTask = _clientSettingsProvider.GetByClientIdAsync(clientId); var diseaseRisksTask = _diseaseRiskProvider.GetAllAsync(); var lookupTask = _lookupsProvider.GetAsync(); await Task.WhenAll(clientDiseaseRiskTask, diseaseRisksTask, lookupTask).ConfigureAwait(false); return(GetEmployeeDiseaseRiskStatuses( clientDiseaseRiskTask.Result, diseaseRisksTask.Result, lookupTask.Result, _mapper, employeeDiseaseRiskStatusRiskStatusRecords)); }
public async Task <IHttpActionResult> GetAsync() { var lookups = await _lookupsProvider.GetAsync(); if (lookups == null) { return(NotFound()); } return(Ok(lookups)); }
public async Task <Lookups> GetAsync() { return(await _cacheService.GetOrSetAsync(CacheKeys.Lookups, async() => await _lookupsProvider.GetAsync())); }