本文介绍了数据表可以多对多到xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在 但也许它更像是一个xml的东西。

我有一个数据集,里面有一个数据表。 
单位表。
单位可以有子单位,而子单位又可以有子单位。
我希望能够做多对多的自选加入。
我的计划是添加另一个表来保存父键和子键。
有一个复杂的因素。
单位可以有变量列。
我在一个单独的xml中定义了列文件和我在代码中动态添加列。
还有另一个复杂因素,可以添加一些动态修饰符来更改字段的内容。
在树视图中显示结果并保存到平面文件这个漂亮很多意味着将结果保存在xml中。

我所写的所有linq都相对简单,这让我摸不着头脑。
所以我的问题是如何写linq处理这种多对多的递归。
提前谢谢。

解决方案

I've just asked this question in ADO.NET DataSet but maybe it's more an xml thing.

I have a dataset with one datatable in it. 
The units table.
Units can have sub-units which can in turn have sub-units or not.
I want to be able to do a many to many optional self join with this.
My plan is to add another table to hold the Parent and child keys.
There's a complication.
Units can have variable columns.
I have the columns defined in a separate xml file and I add columns dynamically in code.
There's another complication in that some dynamic modifiers can be added to change contents of the fields.
Along with presenting the results in a treeview and saving to flat file this pretty much means holding the result in xml.

All the linq I've written has been relatively simple and this has me scratching my head.
So my question is how do I write linq that will handle this sort of many to many recursion.
Thanks in advance.

解决方案


这篇关于数据表可以多对多到xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 00:34