title: Getting a list of objects of 2 different lists
body: <p>I have a list of action type objects. Each object has a list of departments.</p>
  
  <p>I have a user and a user object has n number of deparments.</p>
  
  <p>I would like to get a list of user actions that the user can take. Here is what I came up with:</p>
  
  <pre><code>List&lt;Item&gt; userActions = new List&lt;Item&gt;();
      foreach (var actionType in actionTypelist)
      {
          foreach (var dept in actionType.availableDepts)
          {
              if (data.currentUser.secondaryServDepts.Where(x =&gt; x.Id == dept.servDeptId).Count() &gt; 0)
              {
                  userActions.Add(actionType);
              }
          }
      }
  </code></pre>
  
  <p>Can you please suggest a better way to get a quicker result? Thanks in advance.</p>