public async Task <IEnumerable <SelectListItem> > GetTypes() { return(await _cache.GetOrCreateAsync(CacheHelpers.GenerateTypesCacheKey(), async entry => { entry.SlidingExpiration = CacheHelpers.DefaultCacheDuration; return await _catalogViewModelService.GetTypes(); })); }
public async void OnGet() { CatalogModel.Brands = await _catalogViewModelService.GetBrands(); CatalogModel.Types = await _catalogViewModelService.GetTypes(); }