/// <summary> /// Creates and returns the BankAccount regardless of business errors. /// </summary> public static async Task <BankAccount> GetOrCreateBankAccountAsync( this IBankAccountService service, AccountReference accountDetails) { try { return(await service.GetAccountAsync(accountDetails)); } catch (BankAccountNullException) { return(await service.CreateAccountAsync(accountDetails)); } }