Timeline for Is it necessary to have DTO to domain entity mapping always?
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 23, 2020 at 2:28 | vote | accept | Guru Pasupathy | ||
May 23, 2020 at 2:28 | comment | added | Guru Pasupathy | Thanks for taking your time to respond. I went through the link you had shared. Service layer handles aggregation; example Invoice (composition of Books, Customer) which is the right thing. Still, there will be a use case where I am just going to do a CRUD on a simple entity; example create a Book. In this case, I will be doing a mapping from DTO to Domain model just for transforming (mapping) from BookDTO type to BookEntity type (Domain model) and nothing more as no aggregation is needed in this case. (Choice #3 in your answer.) a small cost for better isolation. Thank you. | |
May 22, 2020 at 19:11 | history | edited | Robert Harvey | CC BY-SA 4.0 |
added 115 characters in body
|
May 22, 2020 at 19:06 | history | answered | Robert Harvey | CC BY-SA 4.0 |