title: Error: An expression tree may not contain a dynamic operation
body: <p>I use Asp.Net 4 and C#, I use EF 4.</p>
  
  <p>I have this query, I receive an error:</p>
  
  <pre><code> An expression tree may not contain a dynamic operation
  </code></pre>
  
  <hr>
  
  <pre><code>dynamic o = e.Item.DataItem;
  var imagesContent = context.CmsImagesContents.FirstOrDefault(img =&gt; img.ContentId == o.ContentId);
  </code></pre>
  
  <p>It seems is imposible to Cast a Dynamic Type using a Lamba Expression.</p>
  
  <p>How I can fix the problem, and able to use my object <code>o in my Lamba</code>? Thanks</p>
  
  <p>PS:
  <code>e.Item.DataItem</code> is of Type <code>CmsContent</code>
  and <code>o.ContentId</code> is of type <code>Int</code></p>