@@ -15,34 +15,33 @@ static async Task Main()
1515 // Generate 2 years of transactions for 50 customers
1616 GenerateCustomerDataAsync ;
1717
18- await Task . Delay ( 2000 ) ;
19-
2018 // Load the customer data asynchronously from the file
2119 var asyncLoadTask = LoadCustomerLogsAsync . ReadCustomerDataAsync ( bank ) ;
2220
2321 // Wait for the async task to complete
2422 await asyncLoadTask ;
2523
26- int countBank2Customers = 0 ;
27- int countBank2Accounts = 0 ;
28- int countBank2Transactions = 0 ;
24+ // Get the bank information
25+ int countBankCustomers = 0 ;
26+ int countBankAccounts = 0 ;
27+ int countBankTransactions = 0 ;
2928
30- foreach ( var customer in bank2 . GetAllCustomers ( ) )
29+ foreach ( var customer in bank . GetAllCustomers ( ) )
3130 {
32- countBank2Customers ++ ;
31+ countBankCustomers ++ ;
3332 foreach ( var account in customer . Accounts )
3433 {
35- countBank2Accounts ++ ;
34+ countBankAccounts ++ ;
3635 foreach ( var transaction in account . Transactions )
3736 {
38- countBank2Transactions ++ ;
37+ countBankTransactions ++ ;
3938 }
4039 }
4140 }
4241
43- Console . WriteLine ( $ "\n Bank 2 information...") ;
44- Console . WriteLine ( $ "Number of customers: { countBank2Customers } ") ;
45- Console . WriteLine ( $ "Number of accounts: { countBank2Accounts } ") ;
46- Console . WriteLine ( $ "Number of transactions: { countBank2Transactions } ") ;
42+ Console . WriteLine ( $ "\n Bank information...") ;
43+ Console . WriteLine ( $ "Number of customers: { countBankCustomers } ") ;
44+ Console . WriteLine ( $ "Number of accounts: { countBankAccounts } ") ;
45+ Console . WriteLine ( $ "Number of transactions: { countBankTransactions } ") ;
4746 }
4847}
0 commit comments