Example #1
0
 public async Task <IEnumerable <SelectListItem> > GetBrands()
 {
     return(await _cache.GetOrCreateAsync(CacheHelpers.GenerateBrandsCacheKey(), async entry =>
     {
         entry.SlidingExpiration = CacheHelpers.DefaultCacheDuration;
         return await _catalogViewModelService.GetBrands();
     }));
 }
        public async void OnGet()
        {
            CatalogModel.Brands = await _catalogViewModelService.GetBrands();

            CatalogModel.Types = await _catalogViewModelService.GetTypes();
        }