Esempio n. 1
0
        public async Task <IActionResult> Withdraw([FromBody] WithdrawRequest request)
        {
            WithdrawOutput output = await _withdrawUseCase.Execute(request.AccountId, request.Amount);

            _presenter.Populate(output);
            return(_presenter.ViewModel);
        }
Esempio n. 2
0
        public async Task <IActionResult> Withdraw([FromBody] WithdrawRequest message)
        {
            var request = new WithdrawInput(message.AccountId, message.Amount);

            await withdrawInput.Process(request);

            return(withdrawPresenter.ViewModel);
        }
        public async Task <IActionResult> Withdraw([FromBody] WithdrawRequest request)
        {
            await _withdrawUseCase.Execute(new Input(request.AccountId, new PositiveAmount(request.Amount)));

            return(_presenter.ViewModel);
        }