How do context based OR mappers handle serialization?

Posts   
 
    
Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 17-Jun-2013 00:05:10   

LLBLGen entities are self tracking so if you send them to a service and back they will know what's been done to them.

So how does Entity Framework handle this? My guess is that it doesn't! Doesn't this totally screw up a service orientated architecture or does it imply that the feature described above is not very useful?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 17-Jun-2013 09:14:46   

They have a template set (we have a port of that in our designer) called self-tracking entities (STE's). They serialize the changes with them. All other types are poco's and you work with derived classes created at runtime.

That they don't do this is indeed a downside, if you want to use the entities on the client side, alter changes there and send them over to the service.

So as you don't have that feature, one often opts for a different model on the client, or generate service layers through e.g. OData (which effectively creates a new model on the client). It's more work indeed. Especially as they also lack a disconnected unit of work, and don't have features like our datascopes which make using entities on the client easy and you can send the unit of work over the wire to the service with a few lines of code.

Frans Bouma | Lead developer LLBLGen Pro
Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 05-Jul-2013 10:28:53   

Apparently STE's are depreciated and the Entity Framework team recommends using WCF Data Services for disconnected entities.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 05-Jul-2013 10:36:18   

sad isn't it? WCF data services generates a complete new object model, which IMHO is extra overhead.

Frans Bouma | Lead developer LLBLGen Pro