I'm creating an application facade in front of my domain model and using dto's for the exchanges between the consumer and the facade.
In order to avoid having to fully qualify my namespaces where I'm mapping between dto's and the domain model, I've suffixed all my dto's with Dto. Ie. CustomerDto, AddressDto etc.
I need to define an enum type as part of my dto's as well and am struggling with whether I should use the Dto suffix on my enum type.
I'm curious what others have done with enum types that reside in their dto's. Any feedback is appreciated.
Thank You
Assuming you're talking about an enum
type when you say "enumeration," I wouldn't suffix it with Dto, since that's not really what it is. For example, I wouldn't say CustomerTypeDto
since it's not a DTO representing a customer type. However, it is an enum
representing the type for a CustomerDto
, so maybe CustomerDtoType
would be appropriate.
Personally I would just use a seperate namepspace and the same name for the enumeration type. I think it's important keep the two seperate so that the external one is just a use case projection of the model.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With