public async Task <ActionResult <ICollection <Guid> > > PostStatements(PostStatementContent model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            ICollection <Guid> guids = await _mediator.Send(CreateStatementsCommand.Create(model.Statements));

            return(Ok(guids));
        }
        public async Task <ActionResult <ICollection <Guid> > > PostStatements(StatementCollection statements, CancellationToken cancellationToken = default)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            ICollection <Guid> guids = await _mediator.Send(CreateStatementsCommand.Create(statements), cancellationToken);

            return(Ok(guids));
        }
Exemplo n.º 3
0
 /// <inheritdoc/>
 public Task <ICollection <Guid> > PostStatements(StatementCollection statements, CancellationToken cancellationToken = default)
 {
     return(mediator.Send(CreateStatementsCommand.Create(statements), cancellationToken));
 }