private async Task <List <BaseCurrencyModel> > GetOrCacheBaseCurrencies() { var cacheResult = await CacheService.GetOrSetHybridAsync(CacheKey.BaseCurrencies(), TimeSpan.FromMinutes(10), async() => { using (var context = ExchangeDataContextFactory.CreateReadOnlyContext()) { var query = context.TradePair .AsNoTracking() .Where(x => x.Status != Enums.TradePairStatus.Closed && x.Currency2.IsEnabled) .Select(currency => new BaseCurrencyModel { CurrencyId = currency.CurrencyId2, Name = currency.Currency2.Name, Symbol = currency.Currency2.Symbol, Rank = currency.Currency2.Rank }).Distinct() .OrderBy(c => c.CurrencyId); return(await query.ToListNoLockAsync().ConfigureAwait(false)); } }).ConfigureAwait(false); return(cacheResult); }