public async Task <IActionResult> GetAccount(string userName) { try { _logger.LogTrace("Accounts controller GetAccount"); var account = await _accounts.GetAccountByIdAsync(userName); if (account == null) { return(NotFound()); } return(Ok(account.ToAccountViewModel())); } catch (Exception) { return(StatusCode(500)); } }
public async Task <Account> GetAccountByIdAsync(long accountId) { return(await _accountsRepository.GetAccountByIdAsync(accountId)); }