public async Task <IActionResult> CreateClientAccountForm(CreateClientAccountViewModel createClientAccountViewModel) { if (ModelState.IsValid) { //сохранение счета var account = createClientAccountViewModel.Account; await _bankAccountRepository.SaveAccount(account : account); return(RedirectToAction(actionName: "GetAccounts", controllerName: "BankAccount", routeValues: createClientAccountViewModel)); } return(View()); }
public async Task <IActionResult> CreateClientAccountForm(CreateClientAccountViewModel createClientAccountViewModel) { if (ModelState.IsValid) { //сохранение счета await _accountRepository.SaveAccount(createClientAccountViewModel.Account); return(RedirectToAction("GetAccounts", "BankAccount", new { idClient = createClientAccountViewModel.Account.IdClient })); } return(View()); }