public async Task <List <BankAccount> > GetBankAccounts(string userId) { try { return(await _bankAccountRepository.GetBankAccountsAsync(userId)); } catch (Exception) { //Error handle return(null); } }
public async Task <ActionResult> GetBankAccountsAsync(CancellationToken cancellationToken) { var bankAccounts = await _bankAccountRepository.GetBankAccountsAsync(cancellationToken); return(Ok(bankAccounts)); }