Beispiel #1
0
        public async Task <IList <AssetExtendedInfo> > GetAssetsExtendedInfosAsync()
        {
            var result = _memoryCache.Get <List <AssetExtendedInfo> >(AssetsExtendedInfoKey);

            if (result != null)
            {
                return(result);
            }

            var allInfo = await _assetsService.AssetExtendedInfoGetAllAsync();

            _memoryCache.Set(AssetsExtendedInfoKey, allInfo, AssetsExtendedInfoCacheMins);

            return(allInfo);
        }
        public async Task <IEnumerable <AssetExtendedInfo> > GetAssetsExtendedInfosAsync()
        {
            var resp = await _assetsService.AssetExtendedInfoGetAllAsync();

            return(resp);
        }
Beispiel #3
0
        public async Task <IActionResult> GetAssetDescriptions()
        {
            var res = await _assetsService.AssetExtendedInfoGetAllAsync();

            return(Ok(AssetDescriptionsResponseModel.Create(res.Select(ConvertToAssetDescription).ToList())));
        }