Quantcast
Channel: User Filip Milovanović - Software Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 164

Comment by Filip Milovanović on Should Value Objects be used inside the DTO?

$
0
0
Your question doesn't entirely make sense to me as stated (though I can guess what you're getting at). But for clarity - what have you read, and as a result of this, what do you think value objects are? Value Objects are just objects that have their identity (and equality) determined solely by their value. As in, two instances are equal and interchangeable if they have the same value (you're not testing for reference equality). Both of your properties are already value objects of a kind. Everything else you add on top of that (constraints, etc.) is up to you as the designer of the type.

Viewing all articles
Browse latest Browse all 164

Trending Articles