Esempio n. 1
0
 /// <summary>
 /// creates bank object
 /// </summary>
 /// <param name="dataInserter">data inserter user to save data into database</param>
 public Bank(IBankDataInserter dataInserter)
 {
     _accountNumberFactory = new AccountNumberFactory(BankId, new NRBControlSumCalculator());
     _userManager          = new UserManager(new DbDataProvider(_accountNumberFactory));
     _executor             = new PersistantExecutor(dataInserter);
     _dataInserter         = dataInserter;
 }
Esempio n. 2
0
 /// <summary>
 /// <see cref="BankingRestService"/>
 /// </summary>
 public BankingRestService(IBankDataInserter dataInserter)
 {
     _inputValidator = new ServiceInputValidator();
     _bank           = new Bank(dataInserter);
 }
 /// <summary>
 /// Creates persistant executor with given data insester
 /// </summary>
 /// <param name="dataInserter">data inserter used to insert data into database</param>
 public PersistantExecutor(IBankDataInserter dataInserter)
 {
     _dataInserter = dataInserter;
 }