Пример #1
0
        public async Task StartAsync()
        {
            var referrals = await _referralService.GetAllReferrals();

            foreach (var item in referrals)
            {
                _memoryCache.Set(Constants.GetCacheReferralKey(item.ReferralId), item);
            }

            var disabledAssets = await _disabledAssetRepository.GetAll();

            foreach (var item in disabledAssets)
            {
                _memoryCache.Set(Constants.GetCacheDisabledAssetKey(item.AssetId), item);
            }

            await Task.CompletedTask;
        }
        public async Task <IEnumerable <string> > List()
        {
            var result = await _disabledAssetRepository.GetAll();

            return(result.Select(x => x.AssetId));
        }