public UnitOfWork(ApplicationDbContext db) { _db = db; Category = new CategoryRepository(_db); CoverType = new CoverTypeRepository(_db); Product = new ProductRepository(_db); Company = new CompanyRepository(_db); ApplicationUser = new ApplicationUserRepository(_db); SPCall = new SPCall(_db); }
protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { _db.Dispose(); SPCall.Dispose(); } disposedValue = true; } }