title: Handling arbitrary queries in NPoco
body: <p>I feel like I'm missing something obvious here, how can I run a query through NPoco and retrieve an arbitrary number of potentially differently typed values as a result.</p>
  
  <p><strong>Example</strong></p>
  
  <p>Say I have a table that looks like this:</p>
  
  <pre><code>|-------------------|------------|
  | ID    |    AMOUNT | DATE       |
  |-------------------|------------|
  | 1     |      2300 | 01/02/2014 |
  | 2     |       400 | 03/02/2014 |
  | 3     |      1200 | 06/02/2014 |
  | 4     |       950 | 06/02/2014 |
  |-------------------|------------|
  </code></pre>
  
  <p>I want to query this table with the following (MSSQL):</p>
  
  <pre><code>SELECT
  MAX(DATE) AS MOST_RECENT_ORDER_DATE, SUM(AMOUNT) AS TOTAL_AMT_OF_ORDERS
  FROM
  ORDERS
  </code></pre>
  
  <p>So I figure I'd use code similar to the following, where <code>db</code> is an NPoco <code>Database</code> object.</p>
  
  <pre><code>var result = db.Query(&lt;query string&gt;);
  </code></pre>
  
  <p>The problem is NPoco's Query method requires a type parameter and I'm not sure what to give it.  The problem is the two values actually have different types, one will be a <code>DateTime</code> and the other will be an <code>int</code>.  I tried using the following:</p>
  
  <pre><code>List&lt;Dictionary&lt;string, object&gt;&gt; result;
  result = db.Query&lt;Dictionary&lt;string, object&gt;&gt;(queryString).ToList();
  </code></pre>
  
  <p>But I can't figure out the syntax to access/use the results, and it all just seems very clunky and I'm sure I must have gone about this the wrong way.</p>
  
  <p>To summarise:</p>
  
  <p><strong>How can I use NPoco to run a query returning columns of different (arbitrary) types, and then access and use those values?</strong></p>