title: Unable to create a constant value of type 'System.Object' in Entity Framework
body: <p>I have a table named <code>UserTenders</code> having many-to-one relationship with <code>aspnet_Membership</code> table.<br>
  I am using EntityFramework 4.0 and when I try something like this, it errors.</p>
  
  <pre><code>var tenders = ctx.UserTenders
      .Where(tender =&gt; tender.HasAdminApproved.Equals(true))
      .ToList();
  </code></pre>
  
  <p>The error is </p>
  
  <blockquote>
    <p>System.NotSupportedException<br>
    Unable to create a constant value of type 'System.Object'.<br>
    Only primitive types ('such as Int32, String, and Guid') are supported in this context.</p>
  </blockquote>
  
  <p>This snippet below works.  </p>
  
  <pre><code>var tenders = ctx.UserTenders.ToList();
  </code></pre>
  
  <p>What could be wrong in my code? Feel like I am missing something very trivial.  </p>
  
  <p>I would like to filter all those rows that have the <code>bit</code> field <code>HasAdminApproved</code> as <code>true</code></p>