public SalesController(AppSettings settings)
        {
            // AppSettings is injected via MVC's inversion of control container.
            // The AppSettings object is setup in Startup.cs

            _repo = new SalesTerritoryRepository(settings.ConnectionString);
        }
 public LookUpService()
 {
     _custClassRepo            = new CustClassRepository(context);
     _paymentTermsRepo         = new PaymentTermsRepository(context);
     _statementCycleRepository = new StatementCycleRepository(context);
     _shipMethodRepository     = new ShipMethodRepository(context);
     _businessFormRepository   = new BusinessFormRepository(context);
     _salesSourceRepository    = new SalesSourceRepository(context);
     _branchRepository         = new BranchRepository(context);
     _salesTerritoryRepository = new SalesTerritoryRepository(context);
     _territoryRepository      = new TerritoryRepository(context);
     _countryRepository        = new CountryRepository(context);
     _customerRepository       = new CustomerRepository(context);
     _userRepository           = new UserRepository(context);
     _groupRepository          = new GroupRepository(context);
     _creditCardTypeRepository = new CreditCardTypeRepository(context);
     _stateRepository          = new StateRepository(context);
     _taxSubjClassRepository   = new TaxSubjClassRepository(context);
     _taxScheduleRepository    = new TaxScheduleRepository(context);
     _batchRepository          = new BatchRepository();
 }
Exemple #3
0
 public AWUnitOfWork(AWContext context)
 {
     _context                = context;
     Address                 = new AddressRepository(context);
     BusinessEntity          = new BusinessEntityRepository(context);
     BusinessEntityAddress   = new BusinessEntityAddressRepository(context);
     PersonPhone             = new PersonPhoneRepository(context);
     StateProvince           = new StateProvinceRepository(context);
     Customer                = new CustomerRepository(context);
     SalesPerson             = new SalesPersonRepository(context);
     SalesOrderHeader        = new SalesOrderHeaderRepository(context);
     SalesOrderDetail        = new SalesOrderDetailRepository(context);
     ShoppingCartItem        = new ShoppingCartItemRepository(context);
     SalesTerritory          = new SalesTerritoryRepository(context);
     Product                 = new ProductRepository(context);
     ProductCategory         = new ProductCategoryRepository(context);
     ProductDescription      = new ProductDescriptionRepository(context);
     ProductInventory        = new ProductInventoryRepository(context);
     ProductListPriceHistory = new ProductListPriceHistoryRepository(context);
     ProductPhoto            = new ProductPhotoRepository(context);
     ProductProductPhoto     = new ProductProductPhotoRepository(context);
     Person = new PersonRepository(context);
 }
 // The constructor gets called by the XUnit test runner proper to executing
 // each test method.  This means each test mothod will have a new instance
 // of the repository.
 public SalesTerritoryRepositoryTests()
 {
     _sut = new SalesTerritoryRepository(ConnectionString);
 }