public ShoppingDataSource() { ShoppingDbContext context = ShoppingDbContextFactory.GetInstance(); Items = new ItemRepository(context); Carts = new CartRepository(context); Users = new UserRepository(context); Orders = new OrderRepository(context); }
public ShoppingDataSource(ItemRepository items, CartRepository carts, UserRepository users, OrderRepository orders) { Items = items; Carts = carts; Users = users; Orders = orders; }