title: Coercing a LINQ result list of KeyValuePair into a Dictionary - Missing the Concept
body: <p>I wanted to write this LINQ statement:</p>
  
  <pre><code>Dictionary&lt;int, ItemBO&gt; result = ( Dictionary&lt;int, ItemBO&gt; )
      ( from item in originalResults where item.Value.SomeCriteria == true
      select item );
  </code></pre>
  
  <p><code>originalResults</code> is of type <code>Dictionary&lt;int, ItemBO&gt;</code>.</p>
  
  <p>I get that <code>item</code> is of type <code>KeyValuePair&lt;int, ItemBO&gt;</code>, but would have thought that the cast from a list of that type to a Dictionary of that type would have been... er... "Natural".</p>
  
  <p>Instead, to get the compiler to shut up, I needed to write this:</p>
  
  <pre><code>Dictionary&lt;int, ItemBO&gt; result = 
      ( from item in originalResults where item.Value.SomeCriteria == true
      select item.Value ).ToDictionary( GetItemKey );
  </code></pre>
  
  <p>Which, although not entirely counter-intuitive, suggests that a lot of unnecessary work unpackaging and repackaging the Dictionary is going on under the covers. Is there a better solution? Is there a concept I'm missing out on?</p>