示例#1
0
 public UnitOfWork()
 {
     context    = new ClothDbContext();
     Clothes    = new ClothRepository(context);    // new MockClothRepository();
     Orders     = new OrderRepository(context);    // new MockOrderRepository();
     Categories = new CategoryRepository(context); //new MockCategoryRepository();
     Users      = new UserRepository(context);
 }
示例#2
0
 private void InitRepositories()
 {
     CategoryRepository    = new CategoryRepository(_context);
     ClothRepository       = new ClothRepository(_context);
     OrderRepository       = new OrderRepository(_context);
     OrderDetailRepository = new OrderDetailRepository(_context);
     RoleRepository        = new RoleRepository(_context);
     UserRepository        = new UserRepository(_context);
 }
 public ClothController(ClothRepository clothRepository)
 {
     ClothRepository = clothRepository;
 }
 public RestController(ClothRepository clothRepository)
 {
     this.clothRepository = clothRepository;
 }
示例#5
0
 public HomeController(ClothRepository clothRepository)
 {
     this.clothRepository = clothRepository;
 }