title: Linq query for creating PIVOT table
body: <p>I have three tables table1, table2 and table3</p>
  
  <pre><code>Table1                                                
  Id  Data
  1   Data1
  2   Data2
  3   Data3
  
  Table2
  Id  Meta data
  1   Meta data1
  2   Meta data2
  “     "
  “     "
  “     "
  
  Table 3
  Id   Data ID  Meta Data ID      Value
  1    Data1    Metadata1         Value1
  2    Data1    Metadata2         Value2
  3    Data2    Metadata1         Value3
  4    Data2    Metadata2         Value4
  </code></pre>
  
  <p>I want to create a pivot table by joining these tables using LINQ queries</p>
  
  <p>My result table should look like this</p>
  
  <pre><code>Data   Metadata 1  Metadata2  ‘”””   and so on……
  Data1  Value1      Value2     
  Data2  Value3      Value4
  </code></pre>
  
  <p>What would be the appropriate linq query which may be solution for me to achieve the result?</p>