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.
var users
There are a couple of ways you can do this:
LINQ Dynamic query libraries: http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx
Expression Trees & Lamda expressions: http://msdn.microsoft.com/en-us/library/bb882637.aspx