May 19, 2024
I’m not sure why the term “anti-pattern” is being used here. From my experience, this pattern works effectively in both simple and complex applications. In around 90% of cases, it has proven to be a very good solution. I would be interested to hear about your specific cases where it hasn’t worked well.
Additionally, I’m unclear about the need for reverse mapping. My discussion is focused solely on UI models in a one-way direction. Your form models should work directly with the DTO version (e.g., enum values).