Пример #1
0
        public async Task <ActionResult> Details(string id)
        {
            var clientId = this.GetClientId();

            var viewModel = new DepositAccountModels
            {
                Account = await _accountsRepository.GetAccountAsync(clientId, id)
            };

            return(View(viewModel));
        }
Пример #2
0
        public async Task <IActionResult> Get(string accountId)
        {
            if (!string.IsNullOrEmpty(accountId))
            {
                Account account = await accountRepository.GetAccountAsync(accountId);

                if (account != null)
                {
                    return(Json(account));
                }
                else
                {
                    return(StatusCode(404, "Account not found."));
                }
            }
            else
            {
                return(StatusCode(400, "No account id supplied."));
            }
        }