string SetCacheTableByUser <T>(Request <T> request)
        {
            var tableName = $"basket_{request.UserId}";

            _basketCacheContext.SetDatabase(tableName);
            return(tableName);
        }
Beispiel #2
0
 public ItemAppService(IRepository <Item> itemRepository,
                       RedisContext <Item> itemCache,
                       IApplicationInjector applicationInjector) : base(applicationInjector)
 {
     _itemRepository = itemRepository;
     _itemCache      = itemCache.SetDatabase(nameof(Item));
 }
Beispiel #3
0
 public BrandAppService(IRepository <Brand> brandRepository,
                        RedisContext <Brand> brandCache,
                        IApplicationInjector applicationInjector) : base(applicationInjector)
 {
     _brandRepository = brandRepository;
     _brandCache      = brandCache.SetDatabase(nameof(Brand));
 }