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); }
public ResourceController(IOptionsSnapshot <Configs.Mongo> options, IOptionsSnapshot <Configs.JWT> secret, IOptionsSnapshot <Configs.Resource> resMons, IHttpContextAccessor httpContextAccessor) : base(options, secret, httpContextAccessor) { ResMons = resMons; ResRepo = new Repositories.Mongo.Resource(MongoClient); }