how to use a generated dbml classes to deserialize xml via linq?

Posted by Eelco Meuter on Stack Overflow See other posts from Stack Overflow or by Eelco Meuter
Published on 2010-05-06T18:14:18Z Indexed on 2010/05/06 18:18 UTC
Read the original article Hit count: 323

Filed under:
|
|
|

Hi,

I have a complex data structure, which I boiled down in a dbml file with one class and 6 one-to-many relations. This data must also be read via xml. The xml structure is something like:

<table id=1> 
   <column 1></column 1>
   <column n></column n> 
   <m-n table x>
       <column 1></column 1>
   </m-n table x>
</table>

where the tag <m-n table x> is one of the six related tables. The idea is to generate an xsd based upon the dbml, which I can use to create and validate a xml. This xml can hopefully deserialized into the dbml classes. The question is: Can this be done? If so, how do I generate the xsd. I use a sql server express 2008 r2 as backend.

Thanks in advance for your time!

© Stack Overflow or respective owner

Related posts about linq-to-sql

Related posts about linq-to-xml