This tutorial is part of Micro service architecture in .NetCore
Blog Api – Clean Code Architecture is a solution template which is built with Loo...
For further actions, you may consider blocking this person and/or reporting abuse
Hi. Thanks for share you knowledge. I have a question about the responses when it comes from query side. Why always do you map in the query response the dto with the same entity with the same parameters. What it's the reason, instead of reaturn the query result with the entity type . Thanks
The reason is that your entity might have more parameters and your client doesnt need all those parameters. So, you create a DTO of what parameters your client want. For an example, client wants only name and age of an user. However, your entity has more information than that like telno, address, designation etc. Therefore, in order to provide what client wants, you create your custom DTO that contains only name and user property.
I understand. But in the case of return the same properties. It should be better return the entity instead of "duplicate " the object contract? Thank for the response.
You can do that if you need to return exact entity.