public async Task <IActionResult> PutStatement([FromQuery] Guid statementId, [ModelBinder(typeof(PutStatementModelBinder))] Statement statement)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            await _mediator.Send(PutStatementCommand.Create(statementId, statement));

            return(NoContent());
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> PutStatement([FromQuery] Guid statementId, Statement statement, CancellationToken cancellationToken = default)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            await _mediator.Send(PutStatementCommand.Create(statementId, statement), cancellationToken);

            return(NoContent());
        }
Ejemplo n.º 3
0
 /// <inheritdoc/>
 public Task PutStatement(Guid statementId, Statement statement, CancellationToken cancellationToken = default)
 {
     return(mediator.Send(PutStatementCommand.Create(statementId, statement), cancellationToken));
 }