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

            repository = new DbPriceListRepository(db);
            customerGroupRepository = new DbCustomerGroupRepository(db);
            productRepository       = new DbProductRepository(db);
        }
Beispiel #2
0
        public InvoiceController()
        {
            StoreContext db = new StoreContext();

            invoiceRepo   = new DbInvoiceDepository(db);
            orderRepo     = new DbOrderRepository(db);
            priceListRepo = new DbPriceListRepository(db);
        }
Beispiel #3
0
        public OrdersController()
        {
            StoreContext db = new StoreContext();

            orderRepo        = new DbOrderRepository(db);
            storageRepo      = new DbStoragePlaceRepository(db);
            orderProductRepo = new DbOrderProductRepository(db);
            pickingOrderRepo = new DbPickingOrderRepository(db);

            addressRepo         = new DbAddressRepository(db);
            customerRepo        = new DbCustomerRepository(db);
            licenseRepo         = new DbAlcoholLicenseRepository(db);
            productRepository   = new DbProductRepository(db);
            priceListRepository = new DbPriceListRepository(db);
        }
Beispiel #4
0
        public void Initializer()
        {
            _mockContext = new Mock <StoreContext>();

            _mockSetPriceList = new Mock <DbSet <PriceList> >();

            var dataPriceList = ResourceData.PriceLists.AsQueryable();

            var setupDbPriceList = Helper.SetupDb(_mockSetPriceList, dataPriceList);

            _mockContext.Setup(pl => pl.PriceLists).Returns(setupDbPriceList.Object);

            var dbPriceListRepository = new DbPriceListRepository(_mockContext.Object);

            _priceListController = new PriceListController(dbPriceListRepository);
        }
Beispiel #5
0
 public PriceListController(DbPriceListRepository dbPriceListRepository)
 {
     repository = dbPriceListRepository;
 }