title: IQueryable: Project columns by their names in linq dynamically at runtime
body: <p>I have a <code>Dictionary&lt;string, string&gt; Fields</code> that contains <strong>propertyNames</strong> and <strong>property Types</strong>.</p>
  
  <p>and I have a query object: <code>IQueryable&lt;T&gt; query = GetQuery();</code></p>
  
  <p>I am using Typebuilder to build a type dynamically according to the Fields dictionary:</p>
  
  <pre><code>TypeBuilder builder = CreateTypeBuilder("MyDynamicAssembly", "MyModule", "MyType");
  
  DataTable dt = new DataTable();
  
  foreach (var s in Fields)
  {
     CreateAutoImplementedProperty(builder, s.Key, Type.GetType(s.Value));
     dt.Columns.Add(s.Key, Type.GetType(s.Value));
  }
  
  Type resultType = builder.CreateType();
  </code></pre>
  
  <p>I want to modify the query object using <code>linq</code> to project only columns that their names are in the <code>Fields</code> dictionary. Something like:</p>
  
  <pre><code>dynamic queryResult = query.Take(10).Select("Don't know how to project here???");
  </code></pre>
  
  <p>consider the column names are:</p>
  
  <pre><code>string[] columnsNames = Fields.Select(x =&gt; x.Key).ToArray();
  </code></pre>
  
  <p>How can I do this?</p>