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
enumtype when you say “enumeration,” I wouldn’t suffix it with Dto, since that’s not really what it is. For example, I wouldn’t sayCustomerTypeDtosince it’s not a DTO representing a customer type. However, it is anenumrepresenting the type for aCustomerDto, so maybeCustomerDtoTypewould be appropriate.