c# - Create Multilevel XML using multilevel join Linq -



c# - Create Multilevel XML using multilevel join Linq -

i trying create xml linq, have multiple table nested above, have create elements definite id selected table1 , on, how create multiple joins above diagram?? or should iteratively repeat , increment joins above??

xdocument xdocument = new xdocument(new xelement("table1", cs in table1 bring together c in table2 on cs.table1_id equals c.fk_table1_id bring together ml in table3 on c.table2_id equals ml.fk_table2_id bring together s in table4 on ml.table3_id equals s.fk_table3_id select new xelement("table2", new xattribute("name", c.name), new xattribute("type", c.type), new xattribute("id", c.id)), //stucked here new xelement("table3", select new xelement("table3", new xattribute("width", ml.height), new xattribute("height", ml.width)),

c# .net xml asp.net-mvc linq

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -