Otis wrote:
You can use entities without a problem with WCF (see the manual (Adapter -> Distributed systems -> WCF) for details about what to do
).
I will take a look at that section of the documentation, thanks !!
Otis wrote:
If your client is a java client, you of course have to opt for DTO's. If you are writing a .NET client, you can use entities and use the features build in, like validation, authorization etc.
it's going to be a .NET Client ( WPF ), let's java to be as far as possible of me xD
Otis wrote:
Thanks for sharing!
. The thing with IsNew and IsDirty is that when the DTO comes back, you want the existing entity (if available) to update with the values. So the best way to do this is I think with fetching the entity and then setting the properties with the data from the DTO. This automatically sets the IsDirty flag. If the DTO is new, you obviously won't find an entity and you fill a new one with the data.
Ok, i was thinking on avoid the need of fetching again the entity before doing the update,
that is why i was thinking in having the IsNew and IsDirty properties in the DTO as well, and map them in both directions.
I'm going to read the Adapter section of the documentation, before doing nothing
Thanks again