Arne said:
"smoother" is not a very well defined term.
You will still need to change the DTO classes.
Not if everything is the same and all one did was change ORMs
And if you don't change the ORM but change the data, then instead
of changing business logic code you now have to change both
business logic and DTO classes.
It's called maintenance programming an everyday fact in enterprise
solutions.
Very true.
But no so relevant for this discussion.
It is still code that need to be maintained.
So, a property is removed, added or primitive type changes. It's not
that big of a deal, which usually happens on initial development. The
DTO rarely changes. But again maintenance is maintenance and
requirements change in the life cycle.
It happens.
I would hesitate using DTO unless there are a very specific
reason to do so (like multi remote access).
Or the DTO has another fields added to the DTO that are not on the
entity, like string Name property to hold the string name that was
looked up by ID that was mapped from the model entity. Or the developer
needs more functionality that cannot be realized on using the EF entity,
which was the no no point that was pointed out to the OP.
They were created for a specific purpose. They are great
for that purpose. But that does not make them great
for any purpose.
I see Plain Old Common Object to be no more than a DTO. They can call it
anything they want, but it's just a DTO.
So myself, I don't have a problem using DTO(s). I like them. It is what
it is and just the facts.
A single purpose program that only runs once, I have no problem using
the EF model objects and all that can buy me. But with enterprise
solutions, I'll map to DTO(s).