public UnitOfWork() { _context = new WebStoreContext(); ProductRepository = new ProductPepository(_context); CategoryRepository = new CategoryRepository(_context); AuthenticationRepository = new AuthenticationRepository(_context); UserRepository = new UserRepository(_context); GroupRepository = new GroupRepository(_context); }
public UnitOfWork() { db = WebStoreContext.Instance; ProductRepository = new ProductPepository(db); CategoryRepository = new CategoryRepository(db); }