简体   繁体   English

使用.Net 在 SQL 服务器中使用 XML 数据类型的最佳方式?

[英]Best way of working with the XML datatype in SQL Server with .Net?

I'm new to using the Xml datatype in SQL Server 2008 and I'm wondering what is the best way of interfacing it with.Net.我是在 SQL Server 2008 中使用 Xml 数据类型的新手,我想知道将它与.Net 接口的最佳方式是什么。 We are currently using SubSonic ActiveRecord as our ORM, so an XML column will just come back as text.我们目前使用 SubSonic ActiveRecord 作为我们的 ORM,因此 XML 列将以文本形式返回。

Are there any libraries out there to assist in querying and making use of the Xml datatype from C#?是否有任何库可以帮助查询和使用 C# 中的 Xml 数据类型?

Use Xml field in SqlServer with nhibernate NHibernate and XML Column Types 使用 SqlServer 中的 Xml 字段与 nhibernate NHibernate 和 Z3501BB093D363810B6710EDTypesFZCFZCF

For transparent XML serialization:对于透明 XML 序列化:

<class name="Foo">
  <!-- ... -->
  <property name="Bar" type="DataAccess.NHibernate.Types.XmlSerializedType`1[[DomainModel.Bar, DomainModel]], DataAccess" />
</class>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM