Linq查询建议?

时间:2012-05-15 09:29:59

标签: linq linq-to-sql linq-to-objects

我在我的应用程序中使用linq2sql我只是坚持这个简单的查询。

我的存储过程返回

id  order   type        text    
1   1   header      Personal details    
2   2   body text   Name    
3   3   body text   Address 
4   4   body text   Pincode 
5   5   body text   Age 
6   6   body text   DOB 
7   7   header      Employment details
8   8   body text   company name    
9   9   body text   role    
10  10  body text   salary  
11  11  header      FAQ 
12  12  sub header  what happens if i leave early?
13  13  body text   bonus amount

我想在Dictionary<string,List<myType>>

中检索此内容
class mytype 
{ 
  string type;
  string text;
}

我所需的输出将是

  personal details , <body text ,Name>
               <body text ,Address>
          <body text ,Pincode>
            <body text ,age>
            <body text ,DOB>

  Empolyment details, <body text ,company Name>
              <body text ,role>
              <body text ,salary>

任何人都可以告诉我如何实现这个linq?

0 个答案:

没有答案
相关问题