public EFUnitOfWork(ApplicationDbContext dbContext, IContentEnvironment contentEnvironment) { _dbContext = dbContext; if (dbContext == null) { throw new ArgumentNullException(nameof(dbContext)); } Products = new EfRepository <Product>(_dbContext); Brands = new EfRepository <Brand>(_dbContext); Categories = new EfRepository <Category>(_dbContext); Countries = new EfRepository <Country>(_dbContext); Characteristics = new EfRepository <Characteristic>(_dbContext); ProductsImages = new ImageRepository <Product>(contentEnvironment); Catalog = new CatalogRepository(_dbContext); }
public ImageRepository(IContentEnvironment contentEnvironment) { _contentEnvironment = contentEnvironment; }