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

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

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