Hi I am very new to DTO patternusing DTOs, and I am starting to understand it slowly, but there are still some missing puzzles for me.
I understand the use of DTO'sDTOs in the way of decoupling the persistence data model from the data model (representation) offered to the consumers. Also, that the aim beneath DTO'sDTOs is to gather in a single response as much info as necessary for clients to save calls to the server.
What I am having a hard time with is understanding what is the best situation to use DTO's compared to use of an entity?
To make it more clear when do I use an entity and when a DTO?
For example when I am trying to save new user in database should I use a DTO or an entity?
For retrieving data from a database and communicating with a frontend in that case only, will I make use of DTO'sDTOs?