public void MakeTransfer(Account creditAccount,Account debitAccount,decimal amount)
 {
     SIAccountRepository accountRepository = new SIAccountRepository();
     SIOperationRepository operationRepository = new SIOperationRepository();
     AccountService service = new AccountService(accountRepository, operationRepository);
     service.MakeTransfer(creditAccount, debitAccount, amount);
 }
Exemple #2
0
        public void MakeTransfer(Account creditAccount, Account debitAccount, decimal amount)
        {
            SIAccountRepository   accountRepository   = new SIAccountRepository();
            SIOperationRepository operationRepository = new SIOperationRepository();
            AccountService        service             = new AccountService(accountRepository, operationRepository);

            service.MakeTransfer(creditAccount, debitAccount, amount);
        }
        static void Main(
            string[] args)
        {
            Account a1 = new Account {
                Id = 34, AuthorizeOverdraft = false, Balance = 34000
            };
            Account a2 = new Account {
                Id = 35, AuthorizeOverdraft = false, Balance = 4000
            };

            var a = new AccountService(new AccountRepository(), new OperationRepository());

            a.MakeTransfer(a2, a1, 1000);
            // dummy just to get this Console App project to build
        }