예제 #1
0
 public UnitOfWork(laptopContext context)
 {
     _context   = context;
     Product    = new ProductRepository(context);
     Cart       = new CartRepository(context);
     CartDetail = new CartDetailRepository(context);
     Promotion  = new PromotionRepository(context);
     Account    = new AccountRepository(context);
 }
 public UnitOfWork(ApplicationDbContext context)
 {
     _context   = context;
     Laptop     = new LaptopRepository(context);
     Cart       = new CartRepository(context);
     CartDetail = new CartDetailRepository(context);
     Promotion  = new PromotionRepository(context);
     User       = new UserRepository(context);
 }
 public UnitOfWorkPromotion(PromotionContext context)
 {
     Promotions = new PromotionRepository(context);
     _context   = context;
 }