Applying Transactions to the SmallTownBank Application
Let's think back to the sample transaction, transferring funds between accounts. Assume you have one customer who wants to transfer funds from her savings account to her checking account. To transfer funds between accounts, you must insert an AccountTransaction record, debit the balance of one account, and credit the balance of another. You want all of this to occur within a transaction you explicitly create. In order to focus on only the transfer funds transaction, let's assume you have a transaction type of 'Transfer Funds' in the TransactionType table, account types of 'Savings' and 'Checking' in the AccountType table, and a customer with each of these accounts in the Customer table. These ...
Get Sams Teach Yourself Microsoft® Windows® DNA Programming in 21 Days now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.