コード例 #1
0
        public ShoppingDataSource()
        {
            ShoppingDbContext context = ShoppingDbContextFactory.GetInstance();

            Items  = new ItemRepository(context);
            Carts  = new CartRepository(context);
            Users  = new UserRepository(context);
            Orders = new OrderRepository(context);
        }
コード例 #2
0
 public ShoppingDataSource(ItemRepository items,
                           CartRepository carts,
                           UserRepository users,
                           OrderRepository orders)
 {
     Items  = items;
     Carts  = carts;
     Users  = users;
     Orders = orders;
 }