public PriceListController() { StoreContext db = new StoreContext(); repository = new DbPriceListRepository(db); customerGroupRepository = new DbCustomerGroupRepository(db); productRepository = new DbProductRepository(db); }
public CustomerController() { var db = new StoreContext(); customerRepo = new DbCustomerRepository(db); customerAdressRepo = new DbCustomerAddressRepository(db); customerGroupRepo = new DbCustomerGroupRepository(db); }
public void Initializer() { _mockContext = new Mock <StoreContext>(); _mockSetCustomerGroup = new Mock <DbSet <CustomerGroup> >(); var dataCustomerGroup = ResourceData.CustomerGroups.AsQueryable(); var setupDbCustomerGroup = Helper.SetupDb(_mockSetCustomerGroup, dataCustomerGroup); _mockContext.Setup(cg => cg.CustomerGroups).Returns(setupDbCustomerGroup.Object); var dbCustomerGroupRepository = new DbCustomerGroupRepository(_mockContext.Object); _customerGroupController = new CustomerGroupController(dbCustomerGroupRepository); }
public CustomerGroupController(DbCustomerGroupRepository dbCustomerGroupRepository) { repository = dbCustomerGroupRepository; }
public CustomerGroupController() { customerRepository = new DbCustomerRepository(); repository = new DbCustomerGroupRepository(); }