Post details
Your domain model and presentation model SHOULD be different because you don’t want to expose the full domain model directly to the client. Don’t think of it as a DTO but think of it as the Anti-corruption layer. Validation at this layer is in construction.
Post details
- They need to be declared, which means they need to be named. - Code needs to be written to map them to other domain objects - If using validation attributes, they need to be duplicated. - Sometimes, if you're pedantic, you redeclare them at every layer to reduce coupling.hachyderm.io/@davidfowl (@davidfowl)Sat, 26 Nov 2022 04:28 GMT
A Guy Who Codes (@browniepoints)Sat, 26 Nov 2022 06:30 GMT