Exemple #1
0
        public async Task <IActionResult> CreateAsync()
        {
            var account = _accountService.GetAccountByUserName(CurrentUserName);

            if (account != null)
            {
                return(RedirectToAction("Index", "Account"));
            }

            account = new Account
            {
                AccountName = await _externalService.GetIBAN(), Owner = HttpContext.User.Identity.Name
            };
            account = await _accountService.CreateAccountAsync(account);

            return(View("Create", account));
        }