Ejemplo n.º 1
0
        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));
            }
        }
Ejemplo n.º 2
0
 public async Task <Account> GetAccountByIdAsync(long accountId)
 {
     return(await _accountsRepository.GetAccountByIdAsync(accountId));
 }