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()); }
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()); }
/// <inheritdoc/> public Task PutStatement(Guid statementId, Statement statement, CancellationToken cancellationToken = default) { return(mediator.Send(PutStatementCommand.Create(statementId, statement), cancellationToken)); }