Ejemplo n.º 1
0
        public GangsterBankUnitOfWork(
            IRepository <Account> accountsRepository,
            IRepository <Address> addressesRepository,
            ICitiesRepository citiesRepository,
            IClientsRepository clientsRepository,
            IContactsRepository contactsRepository,
            ICountriesRepository countryRepository,
            IEmploymentDataRepository employmentDataRepository,
            ILoanProductsRepository loanProductsRepository,
            IObligationRepository obligationsRepository,
            IPassportDataRepository passportDataRepository,
            IPropertyRepository propertiesRepository,
            IPersonalDetailsRepository personalDetailsRepository,
            ILoanRequestsRepository loanRequestsRepository,
            IRolesRepository roles,
            IRepository <LoanProductRequirements> loanProductsRequirmentsRepository,
            IRepository <TakenLoan> takenLoansRepository,
            IRepository <Payment> paymentsRepository,
            ILoanPaymentsRepository loanPaymentsRepository)
        {
            Contract.Requires <ArgumentNullException>(accountsRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(addressesRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(citiesRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(clientsRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(contactsRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(countryRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(employmentDataRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(loanProductsRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(obligationsRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(passportDataRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(propertiesRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(personalDetailsRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(loanRequestsRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(roles.IsNotNull());
            Contract.Requires <ArgumentNullException>(loanProductsRequirmentsRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(takenLoansRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(paymentsRepository.IsNotNull());
            Contract.Requires <ArgumentNullException>(loanPaymentsRepository.IsNotNull());

            this.AccountsRepository                = accountsRepository;
            this.AddressesRepository               = addressesRepository;
            this.CitiesRepository                  = citiesRepository;
            this.ClientsRepository                 = clientsRepository;
            this.ContactsRepository                = contactsRepository;
            this.CountryRepository                 = countryRepository;
            this.EmploymentDataRepository          = employmentDataRepository;
            this.LoanProductsRepository            = loanProductsRepository;
            this.ObligationsRepository             = obligationsRepository;
            this.PassportDataRepository            = passportDataRepository;
            this.PropertiesRepository              = propertiesRepository;
            this.PersonalDetailsRepository         = personalDetailsRepository;
            this.LoanRequestsRepository            = loanRequestsRepository;
            this.RolesRepository                   = roles;
            this.LoanProductsRequirmentsRepository = loanProductsRequirmentsRepository;
            this.TakenLoansRepository              = takenLoansRepository;
            this.PaymentsRepository                = paymentsRepository;
            this.LoanPaymentsRepository            = loanPaymentsRepository;
        }
        public GangsterBankUnitOfWork(
            IRepository<Account> accountsRepository, 
            IRepository<Address> addressesRepository, 
            ICitiesRepository citiesRepository, 
            IClientsRepository clientsRepository, 
            IContactsRepository contactsRepository, 
            ICountriesRepository countryRepository, 
            IEmploymentDataRepository employmentDataRepository, 
            ILoanProductsRepository loanProductsRepository, 
            IObligationRepository obligationsRepository, 
            IPassportDataRepository passportDataRepository, 
            IPropertyRepository propertiesRepository,
            IPersonalDetailsRepository personalDetailsRepository,
            ILoanRequestsRepository loanRequestsRepository,
            IRolesRepository roles,
            IRepository<LoanProductRequirements> loanProductsRequirmentsRepository,
            IRepository<TakenLoan> takenLoansRepository,
            IRepository<Payment> paymentsRepository,
            ILoanPaymentsRepository loanPaymentsRepository)
        {
            Contract.Requires<ArgumentNullException>(accountsRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(addressesRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(citiesRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(clientsRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(contactsRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(countryRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(employmentDataRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(loanProductsRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(obligationsRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(passportDataRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(propertiesRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(personalDetailsRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(loanRequestsRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(roles.IsNotNull());
            Contract.Requires<ArgumentNullException>(loanProductsRequirmentsRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(takenLoansRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(paymentsRepository.IsNotNull());
            Contract.Requires<ArgumentNullException>(loanPaymentsRepository.IsNotNull());

            this.AccountsRepository = accountsRepository;
            this.AddressesRepository = addressesRepository;
            this.CitiesRepository = citiesRepository;
            this.ClientsRepository = clientsRepository;
            this.ContactsRepository = contactsRepository;
            this.CountryRepository = countryRepository;
            this.EmploymentDataRepository = employmentDataRepository;
            this.LoanProductsRepository = loanProductsRepository;
            this.ObligationsRepository = obligationsRepository;
            this.PassportDataRepository = passportDataRepository;
            this.PropertiesRepository = propertiesRepository;
            this.PersonalDetailsRepository = personalDetailsRepository;
            this.LoanRequestsRepository = loanRequestsRepository;
            this.RolesRepository = roles;
            this.LoanProductsRequirmentsRepository = loanProductsRequirmentsRepository;
            this.TakenLoansRepository = takenLoansRepository;
            this.PaymentsRepository = paymentsRepository;
            this.LoanPaymentsRepository = loanPaymentsRepository;
        }
Ejemplo n.º 3
0
        public ClientProfileManager(
            IClientProfileService clientProfileService, 
            ICitiesService citiesService, 
            ICountriesService countriesService,
            IRepository<Property> propertyRepository,
            IObligationRepository obligationRepository)
        {
            Contract.Requires<ArgumentNullException>(clientProfileService.IsNotNull());
            Contract.Requires<ArgumentNullException>(citiesService.IsNotNull());
            Contract.Requires<ArgumentNullException>(countriesService.IsNotNull());

            this.clientProfileService = clientProfileService;
            this.citiesService = citiesService;
            this.countriesService = countriesService;
            this.propertyRepository = propertyRepository;
            this.obligationRepository = obligationRepository;
        }
Ejemplo n.º 4
0
        public ClientProfileManager(
            IClientProfileService clientProfileService,
            ICitiesService citiesService,
            ICountriesService countriesService,
            IRepository <Property> propertyRepository,
            IObligationRepository obligationRepository)
        {
            Contract.Requires <ArgumentNullException>(clientProfileService.IsNotNull());
            Contract.Requires <ArgumentNullException>(citiesService.IsNotNull());
            Contract.Requires <ArgumentNullException>(countriesService.IsNotNull());

            this.clientProfileService = clientProfileService;
            this.citiesService        = citiesService;
            this.countriesService     = countriesService;
            this.propertyRepository   = propertyRepository;
            this.obligationRepository = obligationRepository;
        }
 public void Post([FromBody] Obligation value, [FromServices] IObligationRepository obligationRepository)
 {
     _obligationRepository = obligationRepository;
     _obligationRepository.Load();
 }
 public Obligation Get(string id, [FromServices] IObligationRepository obligationRepository)
 {
     _obligationRepository = obligationRepository;
     return(_obligationRepository.Get(id));
 }
 public IEnumerable <Obligation> Get([FromServices] IObligationRepository obligationRepository)
 {
     _obligationRepository = obligationRepository;
     return(_obligationRepository.GetAll());
 }
Ejemplo n.º 8
0
 public ObligationController(IObligationRepository repository, IDebtRepository debtRepository, IWorkLoadRepository workLoadRepository) : base(repository)
 {
     _repository         = repository;
     _debtRepository     = debtRepository;
     _workLoadRepository = workLoadRepository;
 }
 public void Post([FromBody] string value, [FromServices] IObligationRepository obligationRepository)
 {
     _obligationRepository = obligationRepository;
     _obligationRepository.InitialiseData();
 }