Exemple #1
0
 public UnitOfWork(WebShopDbContext context)
 {
     _context     = context;
     Product      = new ProductRepository(context);
     Order        = new OrderRepository(context);
     ShoppingCart = context.ShoppingCartItems;
     OrderDetail  = new OrderDetailRepository(context);
 }
Exemple #2
0
 public OrderDetailRepository(IWebShopDbContext context) : base(context)
 {
 }
Exemple #3
0
        protected readonly IWebShopDbContext Context;  //derived class access because inheritance

        public Repository(IWebShopDbContext context)
        {
            Context = context;
        }
Exemple #4
0
 public ProductRepository(IWebShopDbContext context) : base(context)
 {
 }