Converting XML database column to .Net object on data retrieval

Posts   
 
    
Robert.W
User
Posts: 79
Joined: 19-Jun-2007
# Posted on: 19-Jun-2007 18:24:51   

Hi,

I am currently reviewing LLBLGen hoping I can recommend it as an O/R Mapper / code generator at my company. I have come across a practice that we sometimes use in our database design but I don't yet know if LLBLGen is able to handle it in an elegant fashion.

Our scenario is as follows:

We have an XML column in a database table which correcponds to a complex .Net type property in the object model. Currently when we persist such .Net object we serialize the property and put it into the XML database column. When retrieving data we deserialize the contents of the XML column into an object and assign it to a property. Serialization and deserialization is implemented using custom code - not the standard .Net xml serializer.

My question is: can I, using the LLBLGen designer, somehow attach a custom converter (written by us) that will know how to process the property when persisting the object and building it back on data retrieval? Would it be possible to have a couple of such properties (complex .Net objects of different types) in a single entity and assign different converters to them?

Best regards, Robert Wilczynski.

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 20-Jun-2007 08:35:12   

Would you please check the Concepts -> Type Converters section in the LLBLGen Pro manual?