Beispiel #1
0
        public async Task <IActionResult> Transfer(
            [FromServices] ITransferUseCase useCase,
            [FromRoute][Required] Guid accountId,
            [FromRoute][Required] Guid destinationAccountId,
            [FromForm][Required] decimal amount,
            [FromForm][Required] string currency)
        {
            useCase.SetOutputPort(this);

            await useCase.Execute(
                accountId,
                destinationAccountId,
                amount,
                currency)
            .ConfigureAwait(false);

            return(this._viewModel !);
        }
#pragma warning disable SCS0016 // Controller method is potentially vulnerable to Cross Site Request Forgery (CSRF).
        public async Task <IActionResult> Transfer(
#pragma warning restore SCS0016 // Controller method is potentially vulnerable to Cross Site Request Forgery (CSRF).
            [FromServices] ITransferUseCase useCase,
            [FromRoute][Required] Guid accountId,
            [FromRoute][Required] Guid destinationAccountId,
            [FromForm][Required] decimal amount,
            [FromForm][Required] string currency)
        {
            useCase.SetOutputPort(this);

            await useCase.Execute(
                accountId,
                destinationAccountId,
                amount,
                currency)
            .ConfigureAwait(false);

            return(this._viewModel !);
        }