예제 #1
0
 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);
 }
예제 #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (!disposedValue)
     {
         if (disposing)
         {
             _db.Dispose();
             SPCall.Dispose();
         }
         disposedValue = true;
     }
 }