public AppContext()
        {
            _appProfile = AppProfile.FromConfig();

            _dataSourceConfig = new DataSourceConfig(
                _appProfile.DataSource,
                _appProfile.Database,
                _appProfile.Username,
                _appProfile.Password
                );

            _addressRepository     = new AddressRepository(_dataSourceConfig);
            _billingInfoRepository = new BillingInfoRepository(_dataSourceConfig, _addressRepository);
            _contactInfoRepository = new ContactInfoRepository(_dataSourceConfig);
            _supplierRepository    = new SupplierRepository(_dataSourceConfig, _billingInfoRepository, _contactInfoRepository);
            _receiverRepository    = new ReceiverRepository(_dataSourceConfig, _billingInfoRepository, _contactInfoRepository);
            _itemRepository        = new InvoiceItemRepository(_dataSourceConfig);
            _paymentRepository     = new InvoicePaymentRepository(_dataSourceConfig);
            _invoiceRepository     = new InvoiceRepository(_dataSourceConfig, _supplierRepository, _receiverRepository, _itemRepository, _paymentRepository
                                                           );

            _addressService     = new AddressService(_addressRepository);
            _billingInfoService = new BillingInfoService(_billingInfoRepository);
            _contactInfoService = new ContactInfoService(_contactInfoRepository);
            _supplierService    = new SupplierService(_supplierRepository);
            _receiverService    = new ReceiverService(_receiverRepository);
            _itemService        = new InvoiceItemService(_itemRepository);
            _paymentService     = new InvoicePaymentService(_paymentRepository);
            _invoiceService     = new InvoiceService(_invoiceRepository);
        }
 public InvoicePaymentManager(IHttpContextAccessor contextAccessor,
                              IInvoicePaymentRepository invoicePaymentRepository, ICustomerRepository customerRepository,
                              ITransactionRepository transactionRepository, IInvoiceRepository invoiceRepository,
                              IUnitOfWork unitOfWork)
 {
     _userId = contextAccessor.HttpContext.User.GetUserId();
     _invoicePaymentRepository = invoicePaymentRepository;
     _invoiceRepository        = invoiceRepository;
     _customerRepository       = customerRepository;
     _transactionRepository    = transactionRepository;
     _unitOfWork = unitOfWork;
 }
Ejemplo n.º 3
0
 public InvoiceRepository(
     IDataSourceConfig dataSource,
     IEntitySupplierRepository supplierRepository,
     IEntityReceiverRepository receiverRepository,
     IInvoiceItemRepository itemRepository,
     IInvoicePaymentRepository paymentRepository
     )
 {
     _dataSource         = dataSource;
     _supplierRepository = supplierRepository;
     _receiverRepository = receiverRepository;
     _itemRepository     = itemRepository;
     _paymentRepository  = paymentRepository;
 }
 public InvoicePaymentController(IInvoicePaymentRepository invoicePaymentResposistory)
 {
     _invoicePaymentResposistory = invoicePaymentResposistory;
 }
Ejemplo n.º 5
0
 public InvoicePaymentService(IInvoicePaymentRepository repository)
 {
     _repository = repository;
 }