开发者

Using XML datatype with LINQ to SQL

开发者 https://www.devze.com 2023-04-10 23:06 出处:网络
I want to store an xml file in my database using the XML datatype. Currently the property of the entity is XElement. I set this to a Xelement and debugging i can see that its set correctly on the enti

I want to store an xml file in my database using the XML datatype. Currently the property of the entity is XElement. I set this to a Xelement and debugging i can see that its set correctly on the entity however it dosent save when I submit changes.

Is what I want to do possible? Sh开发者_JAVA技巧ould i change the default mapping?


See http://conficient.wordpress.com/2008/08/11/linq-to-sql-faq-xml-columns-in-sql/

and Linq-to-SQL With XML Database Fields -- Why does this work?

You need to new up a new XElement with the changes for linq to sql to update the field.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号