views:

810

answers:

2

Has anyone tried to use xml typed columns with Entity Framework ? The entity returns a string.

Will the next version of Entity Framework support XElement types when the table column is of type XML.

Regards.

A: 

What are you trying to do with the XML column? You should be able to read it's contents as a string and if you need to play around with it, paste it into an XDocument and party on it.

Or what are you trying to do? What are you expecting to see (in a next version of EF)?

Marc

marc_s
+1  A: 

Entity Framework returns XML columns contents(typed or not) as strings so it can't create an entity from the xml documents content(it's nodes)... if you are still curious read this article, it gives a possible solution to your problem..i didn't tried it though(link text)

to answer Marc's last question..what i expect to see in the next version of EF is the possibility to map xml documents contents as entities, like it does with normal tables and the relationships between them.. or at least to make parts of the xml document as properties in entities..

SorinA.