I understand that a strict definition of DTO should serve as a container for data transfer, it should not have any behavior. However, I came across a situation with the need to clone DTO, two options: 1. create the Clone method (ICloneable?) In DTO 2. create a general utility class for DTO cloning
I am currently using option # 2. However, I think No. 1 is acceptable if there is no logic in the DTO. I would like one of you to face a similar situation with DTO, which required basic operations such as Clone, ToString, especially DTO, which had inheritance. Thanks.
source share