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); }
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; }
public HomeController(ClothRepository clothRepository) { this.clothRepository = clothRepository; }