public async Task <IActionResult> DepositAsync(StartDepositInput dto)
        {
            if (!await _accountQueryService.HasAccountAsync(dto.AccountId))
            {
                return(NotFound("The bank account does not exist."));
            }

            var command = ObjectPortMapper <StartDepositInput, StartDepositApplicationCommand> .Map(dto);

            await _eBankApplicationService.DepositedFundsAsync(command);

            return(Accepted());
        }
Beispiel #2
0
        public async Task <IActionResult> ChangeNameAsync(ChangeAccountNameInput dto)
        {
            if (!await _accountQueryService.HasAccountAsync(dto.AccountId))
            {
                return(NotFound("The bank account does not exist."));
            }

            var command = ObjectPortMapper <ChangeAccountNameInput, ChangeAccountNameApplicationCommand> .Map(dto);

            await _eBankApplicationService.ChangeAccountNameAsync(command);

            return(Accepted());
        }