Example #1
0
        public PriceListController()
        {
            StoreContext db = new StoreContext();

            repository = new DbPriceListRepository(db);
            customerGroupRepository = new DbCustomerGroupRepository(db);
            productRepository       = new DbProductRepository(db);
        }
Example #2
0
        public CustomerController()
        {
            var db = new StoreContext();

            customerRepo       = new DbCustomerRepository(db);
            customerAdressRepo = new DbCustomerAddressRepository(db);
            customerGroupRepo  = new DbCustomerGroupRepository(db);
        }
Example #3
0
        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);
        }
Example #4
0
 public CustomerGroupController(DbCustomerGroupRepository dbCustomerGroupRepository)
 {
     repository = dbCustomerGroupRepository;
 }
Example #5
0
 public CustomerGroupController()
 {
     customerRepository = new DbCustomerRepository();
     repository         = new DbCustomerGroupRepository();
 }