Merging Entities

Posts   
 
    
Answer
User
Posts: 363
Joined: 28-Jun-2004
# Posted on: 10-Jun-2006 22:59:32   

How do you other llblgeners merge entities when using remoting?

I understand the context object was designed for this but i cant figure out how to use it...what i would like to do is call

public ItemEntity Save(ItemEntity item)

The return is the modified entity, what iw ould like to do is merge the changes back into the original entity on the client...how can i accomplish this?

Or is a better option to just take the returned entity and repopulating the client etc as if its a totally new entity? ( ie, rebind it to grids, controls etc as if the form was just loading up)

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 11-Jun-2006 11:44:49   

Use a context. simple_smile The Get overload which merges the changes back into the instance should help you. Be sure to fetch the entity at the server back into the same entity object when you send it back so hte ObjectId's are the same.

Frans Bouma | Lead developer LLBLGen Pro