Hi Robert,
i let nhibernate do the change tracking:

select_before_update and dynamic_update do the trick.
Peter


On 28 Mrz., 20:52, Robert Rudduck <[email protected]> wrote:
> It is an interesting problem. How are you detecting changes between the DTOs
> and the Domain objects currently?
>
> I have implemented something like this in the past:
>
> Query for the list / graph of domain entities.
>
> Map the DTOs back to the entities allowing NH to handle updates.
>
> Call Save() on all DTOs that don't have matching domain entities and
> conversely Delete() on all Domain objects that no longer have DTOs.
>
> It sounds a lot more complicated than it is, since most of that
> functionality can be abstracted to a single generic implementation.
>
> Hope that helps.
>
> - Robert
>
>
>
> On Sat, Mar 27, 2010 at 8:47 AM, Fabio Maulo <[email protected]> wrote:
> > mappings ?
>
> > 2010/3/27 Peter Forstmeier <[email protected]>
>
> > Hi,
> >> from my Backend i get a disconneted  List<TimeEntryDto>.
> >> While editing this list in a DataGrid i can handle 'Add' and 'Modify'
> >> with 'select-before-update' for edit and check for an  empty ID for
> >> Add and Insert.
> >> But i have no way to handle deleted items. Did i have to use an
> >> StateProperty(Enum) to do this task or is there any other way.
>
> >> Thanks
> >> Peter
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "nhusers" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to
> >> [email protected]<nhusers%[email protected]­>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/nhusers?hl=en.
>
> > --
> > Fabio Maulo
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "nhusers" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<nhusers%[email protected]­>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhusers?hl=en.- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to