コード例 #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);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 public UnitOfWorkPromotion(PromotionContext context)
 {
     Promotions = new PromotionRepository(context);
     _context   = context;
 }