Serialization of UnitOfWork

Posts   
 
    
Kazak
User
Posts: 18
Joined: 25-Aug-2004
# Posted on: 14-Dec-2005 04:13:38   

Hi All,

I'm trying serialization with UnitOfWork. It does not seem to work. When I deserialize, I always get an instance with empty UnitOfWorkElementCollection's. I tried both Xml Serialization and Runtime serialization using BinaryFormatter. ConstructSaveProcessQueues did not help either.

Thanks

Kazak
User
Posts: 18
Joined: 25-Aug-2004
# Posted on: 14-Dec-2005 05:27:09   

Kazak wrote:

Hi All,

I'm trying serialization with UnitOfWork. It does not seem to work. When I deserialize, I always get an instance with empty UnitOfWorkElementCollection's. I tried both Xml Serialization and Runtime serialization using BinaryFormatter. ConstructSaveProcessQueues did not help either.

Thanks

Just noticed that UnitOfWork does not implement ISerializable, but its Adapter counterpart does. Why is that?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 14-Dec-2005 08:30:11   

Hmm, all code is there, the interface is just not specified. Good catch flushed

It's not really supported on selfservicing as remoting is not recommended for selfservicing because of the lazy loading embedded in selfservicing. Adapter is way more efficient in remoting scenario's.

I'll add the ISerializable specification and port my UoW serialization unittests to selfservicing to see if I indeed also get the errors you get. It's recommended to use adapter for remoting scenario's.

Frans Bouma | Lead developer LLBLGen Pro