public async Task <OkObjectResult> Get([FromRoute] int id, CancellationToken cancellationToken) { CreateIItemDto result = await _mediator.Send(new CreateToDoItemCommand(null), cancellationToken); // ToDoItemQueryDto result = await _mediator.Send(new ToDoItemGetByIdQuery(new ToDoItemGetByIdSpecification(id)), cancellationToken); return(Ok(result)); }
public async Task <ActionResult <CreateIItemDto> > Post(ToDoItemResource toDoItem, CancellationToken cancellationToken) { CreateIItemDto result = await _mediator.Send(new CreateToDoItemCommand(toDoItem.Description), cancellationToken); return(Ok(result)); }