Collections and Primitive Obsession

added by DotNetKicks
2/16/2022 4:39:00 PM

277 Views

But what about primitive obsession with collections? Let's say we have the following class: Shouldn't its collection of orders also be represented as a custom class? For example, we could introduce an OrderList, like this: Wouldn't this version be better, similar to how Email is better than string when it comes to modeling of email addresses?


0 comments