title: Using a Linq query to select objects where any value of a property matches values from a list
body: <p>So I am trying to filter the modules object list by <code>userID</code> of the currently logged in user.  After that I am trying to take the <code>moduleID</code> of those selected object.</p>
  <p>Using that I want to filter the reports list to only those that contain a <code>moduleID</code> that matches any of the the previously obtained list of <code>moduleID</code>.</p>
  <p>I'm not that particularly knowledgeable on Linq and this is what I came up with:</p>
  <pre><code>    var name = User.Identity.GetUserName();
          //gets the currently logged in user:
          ApplicationUser currentUser = 
              (ApplicationUser)db.Users.Single(x =&gt; x.UserName == name); 
          //gets moduleID's for modules owned by current user:
          var modules = (from i in db.Modules
                         where i.User == currentUser
                         select i.ModuleID); 
          var Reports = from u in db.Reports
                        where u.moduleID == modules
                        select u;
  </code></pre>
  <p>I'm having problems with the last portion trying to incorporate the contains method into the statement.</p>
  <p>Any help would be appreciated.</p>