title: How to access columns from an IQueryable when dynamically constructed?
body: <p>I am using the System.Linq.Data library provided here - <a href="http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx" rel="nofollow">http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx</a></p>
  
  <p>I have the following query which works great and returns an Iqueryable</p>
  
  <pre><code>IQueryable customer =
                  ctx.Customers.Where(cust =&gt; true).Select("new("Name,Address")");
  </code></pre>
  
  <p>However, how do I access these returned columns? I cannot access them using a lambda expression as follows:</p>
  
  <p>var test = customer.Where(cust=>cust.Name == "Mike").First();</p>
  
  <p>"cust.Name" in the above case cannot be resolved. It does not exist in the list of methods/properties for "cust". </p>
  
  <p>Am i assuming something wrong here. I understand that I am working with an anonymous type. Do I have to create a DTO in this case?</p>