title: How do you add dynamic 'where' clauses to a linq query?
body: <p>I've got a User table with a bitmask that contains the user's roles. The linq query below returns all the users whose roles include 1, 4 or 16. </p>
  
  <pre><code>var users = from u in dc.Users
              where ((u.UserRolesBitmask &amp; 1) == 1)
                 || ((u.UserRolesBitmask &amp; 4) == 4)
                 || ((u.UserRolesBitmask &amp; 16) == 16)
              select u;
  </code></pre>
  
  <p>I'd like to rewrite this into the method below to returns all the users from the given roles so I can reuse it:</p>
  
  <pre><code>private List&lt;User&gt; GetUsersFromRoles(uint[] UserRoles) {}
  </code></pre>
  
  <p>Any pointers on how to dynamically build my query? Thanks</p>