title: C# Linq SQL select Multiple columns to List
body: <p>Hi I want to select 4 columns form DB then select to a List</p>
  
  <pre><code>public struct keyData
  {
  
      public int pid;
      public int sid;
      public string proid;
      public string title;
  }
  </code></pre>
  
  
  
  <pre><code>Entities dbconn = new Entities();
  List&lt;keyData&gt; temRes = (
      from viewData in dbconn.vw1
      join hData in dbconn.tableH
      on new { pid= (int)viewData.pid, proid= viewData.proid}
      equals new { pid= (int)hData .pid, proid= hData .proid}
      into joinSet
      from joinUnit in joinSet.DefaultIfEmpty()
      where joinUnit == null
      select new { pid= (int)viewData.pid, sid= (int)viewData.sid, proid= viewData.proid, Title=viewData.Title }
      ).ToList();
  </code></pre>
  
  <p>then it says:    </p>
  
  <p>Error   3   Cannot implicitly convert </p>
  
  <pre><code>type 'System.Collections.Generic.List&lt;AnonymousType#1&gt;' 
  </code></pre>
  
  <p>to <code>'System.Collections.Generic.List&lt;hl.Program.keyData&gt;'</code></p>
  
  <p>thanks</p>
  
  <p>using MarcinJuraszek 's idea</p>
  
  <p>it gives me :</p>
  
  <pre><code>Only parameterless constructors and initializers are supported in LINQ to Entities
  </code></pre>