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