private static void ShowAccount() { var accountNbr = CaptureInput(); var accounts = JsonBank.ReadAccounts(); var matchedAccounts = accounts.Where(acc => acc.Number.ToString() == accountNbr); if (!matchedAccounts.Any()) { Console.WriteLine("The account number does not exist!"); Console.Write("Press Enter to return to Main Menu"); Console.ReadLine(); return; } PrintAccountsTable(matchedAccounts); }
private static void ShowAccounts() { var accounts = JsonBank.ReadAccounts(); PrintAccountsTable(accounts); }