Equivalent of DataSet.GetChanges()?

Posts   
 
    
alexk
User
Posts: 19
Joined: 14-Sep-2005
# Posted on: 14-Sep-2005 04:25:17   

I am using the Adapter template in a remoting scenario where the remote type does the CRUD. The presentation tier client will be web forms. One of the forms allows the end user to edit both one parent object and many related child objects.

Suppose there are 20 child objects and only one is updated (or added or deleted). Upon postback, is there a convenient way to send only the changed objects in the object graph to the remote save method? e.g., in the preceding example, the parent object (required to be sent cause it's the root of the graph) along with one child object would be sent over the wire.

Thanks in advance for any help.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 14-Sep-2005 09:26:10   

This has been added to 1.0.2005.1, which will go into beta later today (if nothing severe pops up wink ). Normally you would add all this to a UnitOfWork, and with 1.0.2005.1, it calculates which entities are actually changed, prior to serialization, so when you send a UnitOfWork over to the server, it will only contain the changed objects, which is what you want simple_smile

Frans Bouma | Lead developer LLBLGen Pro