Ejemplo n.º 1
0
        public ProductController(IOptionsSnapshot <Mongo> options, IOptionsSnapshot <Redis> caching, IOptionsSnapshot <Configs.JWT> secret, IHttpContextAccessor httpContextAccessor) : base(options, secret, httpContextAccessor)
        {
            CachingOptions = caching;
            RedisClient    = new Databases.Redis(CachingOptions);
            RedisItems     = new Repositories.Redis.Product(RedisClient);

            MongoItems = new Repositories.Mongo.Product(MongoClient);
            MongoSubs  = new Repositories.Mongo.SubCategory(MongoClient);
            MongoCats  = new Repositories.Mongo.Category(MongoClient);
            MongoRes   = new Repositories.Mongo.Resource(MongoClient);
        }
Ejemplo n.º 2
0
 public SubCategoryController(IOptionsSnapshot <Mongo> options, IOptionsSnapshot <Configs.JWT> secret, IHttpContextAccessor httpContextAccessor) : base(options, secret, httpContextAccessor)
 {
     SubRepo = new Repositories.Mongo.SubCategory(MongoClient);
 }