Entity Framework 6.1是否本地支持XML数据类型? [英] Does Entity Framework 6.1 support an XML data type natively?
问题描述
某些RDBMS(包括SQL Server)支持XML列。我不希望将这样的列映射到 string
数据类型。 Entity Framework 6.1是否以任何方式原生支持XML?
Some RDBMSs (including SQL Server) support XML columns. I'd prefer not mapping such a column to the string
data type. Does Entity Framework 6.1 support XML natively in any way?
更具体地说,我可以将 xml
列映射到一个.NET的XML数据类型(例如 XElement
或 XmlElement
)是什么?实体框架是否支持集成到普通LINQ查询中并转换为SQL查询的XQuery?
More specifically, can I map an xml
column to one of the XML data types of .NET (such as XElement
or XmlElement
)? Does Entity Framework support XQuery that is integrated into normal LINQ queries and is translated to SQL queries?
推荐答案
否,仅将其映射到字符串,然后必须将其流回XML文档。
No, only mapping it to string and then having to stream it back in to an XML document.
Microsoft在EF4、5或6中有很长的往返线程
There is a long thread back and forth with Microsoft about doing this in EF4, 5, or 6, but it looks like they researched it and decided to punt.
您可以在此处阅读以下内容:
You can read that here:
这篇关于Entity Framework 6.1是否本地支持XML数据类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!