简体   繁体   中英

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. We are currently using SubSonic ActiveRecord as our ORM, so an XML column will just come back as text.

Are there any libraries out there to assist in querying and making use of the Xml datatype from C#?

Use Xml field in SqlServer with nhibernate NHibernate and XML Column Types

For transparent XML serialization:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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