Skip to content

CQRS with Rest API #457

Discussion options

You must be logged in to vote

Hi @NghiaNguyen170192
I believe the best way to fix it - do not use commands as a DTO.
Co, create UpdateTodoListDto without id and use it as a parameter of the controller method.
Then create a command and put id and DTO to it. And a command send to handler.
So no id duplication.
What do you think about this approach?

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@NghiaNguyen170192
Comment options

@neman
Comment options

Answer selected by NghiaNguyen170192
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants