public async Task <IActionResult> Close(Guid accountId)
        {
            Guid output = await _closeAccountUseCase.Execute(accountId);

            _presenter.Populate(output);
            return(_presenter.ViewModel);
        }
Esempio n. 2
0
        public async Task <IActionResult> Close(
            [FromServices] ICloseAccountUseCase useCase,
            [FromRoute][Required] Guid accountId)
        {
            useCase.SetOutputPort(this);

            await useCase.Execute(accountId)
            .ConfigureAwait(false);

            return(this._viewModel !);
        }
Esempio n. 3
0
        public async Task <IActionResult> Close(Guid accountId)
        {
            Guid closeResult = await closeService.Execute(accountId);

            if (closeResult == Guid.Empty)
            {
                return(new NoContentResult());
            }

            return(Ok());
        }