LLBL Gen vs Datasets

Posts   
 
    
VK avatar
VK
User
Posts: 10
Joined: 30-Nov-2005
# Posted on: 04-Dec-2005 22:21:04   

Hello,

I consider moving from datasets in my remoting application to LLBL.

With datasets I could use DataSet.GetChanges method to get a dataset with changed records on a client. This dataset I passed through remoting to an application server, did necessary inserts, updates, deletes, returned refreshed dataset to the client, merged it with the client dataset and commited changes to the client dataset.

Is it possible to do something like this in LLBL? Or what will be the routine using LLBL?

Regards, Vladimir

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 05-Dec-2005 12:26:44   

In LLBLGen Pro you use the entity collection's DirtyEntities property (It's in adapter, as you're using remoting, adapter is highly recommended) to get the entities which are 'dirty'/changed. Then send it to the server and process the collection there. You send the new collection back.

On the client you then use a Context and add the received collection to the context. Then you traverse the original collection and call get on the context to get the object in that context (which is from the server) which represents the same entity.

Frans Bouma | Lead developer LLBLGen Pro