public UnitOfWork(LocalDbEntities context) { _context = context; ProductManager = new ProductManager(context); CatalogManager = new CatalogManager(context); ProductCatalogManager = new ProductCatalogManager(context); }
public async Task <PagedResult <ProductCatalog> > GetProductCatalogs(QueryResultSettings queryResultSettings) { ManagerFactory managerFactory = Utilities.GetManagerFactory(this.EcommerceContext); IProductCatalogManager productCatalogManager = managerFactory.GetManager <IProductCatalogManager>(); long channelId = await Utilities.GetChannelId(this.EcommerceContext); PagedResult <ProductCatalog> productCatalogs = await productCatalogManager.GetCatalogs(channelId, activeOnly : true, queryResultSettings : queryResultSettings); return(productCatalogs); }