private async Task <CodeListAll> GetAllCodeListsWithValues() { var completeList = new CodeListAll(); var alfrescoResponse = await _alfrescoHttpClient.CodeListGetAll(); foreach (var list in alfrescoResponse.CodeLists) { var values = await _alfrescoHttpClient.CodeListGetWithValues(list.Name); completeList.Values.Add(Copy(values.CodeList)); } return(completeList); }
public async Task <List <CodeListModel> > GetAllListsOfValues() { if (_simpleMemoryCache.IsExist(_cacheKey)) { return(_simpleMemoryCache.Get <List <CodeListModel> >(_cacheKey)); } var codeLists = new List <CodeListModel>(); var alfrescoResponse = await _alfrescoHttpClient.CodeListGetAll(); foreach (var list in alfrescoResponse.CodeLists.Where(x => x.Name != "rmc_smList")) { codeLists.Add(await GetListValues(list.Name)); } _simpleMemoryCache.Create(_cacheKey, codeLists); return(codeLists); }