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

            _presenter.Populate(output);
            return(_presenter.ViewModel);
        }
示例#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 !);
        }
示例#3
0
        public async Task <IActionResult> Close(Guid accountId)
        {
            Guid closeResult = await closeService.Execute(accountId);

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

            return(Ok());
        }