title: LINQ-to-SQL: ExecuteQuery(Type, String) populates one field, but not the other
body: <p>I've written an app that I use as an agent to query data from a database and automatically load it into my distributed web cache.</p>
  
  <p>I do this by specifying an sql query and a type in a configuration. The code that actually does the querying looks like this:</p>
  
  <pre><code>List&lt;Object&gt; result = null;
  try { result = dc.ExecuteQuery(elementType, entry.Command).OfType&lt;Object&gt;().ToList(); }
  catch (Exception ex) { HandleException(ex, WebCacheAgentLogEvent.DatabaseExecutionError); continue; }
  </code></pre>
  
  <p><code>elementType</code> is a System.Type created from the type specified in the configuration (using <code>Type.GetType()</code>), and <code>entry.Command</code> is the SQL query.</p>
  
  <p>The specific entity type I'm having an issue with looks like this:</p>
  
  <pre><code>public class FooCount
  {
      [Column(Name = "foo_id")]
      public Int32 FooId { get; set; }
  
      [Column(Name = "count")]
      public Int32 Count { get; set; }
  }
  </code></pre>
  
  <p>The SQL query looks like this:</p>
  
  <pre><code>select foo_id as foo_id, sum(count) as [count]
  from foo_aggregates
  group by foo_id
  order by foo_id
  </code></pre>
  
  <p>For some reason, when the query is executed, the "Count" property ends up populated, but not the "FooId" property. I tried running the query myself, and the correct column names are returned, and the column names match up with what I've specified in my mapping attributes. Help!</p>