With the .Net Entity Framework and Linq, I'm having a problem finding the best (i.e. easiest to read/understand) way to implement a search for whether or not an entity collection contains any of several possible values.
Consider a basic membership/roles implementation, where User has a Roles collection.
What would be the "best" way to say "does this user have any of the following roles: role1, role2, or role3?"
I can do it with 1 role to check, as in:
if myUser.Roles.Contains(role1) { // do something }
Is there a simple way to add more roles to this check?