title: Filter a list based on multiple criteria and multiple values (unknown number of values)
body: <p>I have a class <code>User</code>:</p>
  
  <pre><code>public class User{
      // some properties
      public string Name { get; set; }
      public int PerfLoc { get; set; }
      public bool Active { get; set; }
      // constructor would follow ..
  }
  </code></pre>
  
  <p>Than I have a class <code>PerfLoc</code>:</p>
  
  <pre><code>public class PerfLoc{
      // some properties
      public string Number { get; set; }
      // constructor would follow ..
  }
  </code></pre>
  
  <p>I have a list of users <code>List&lt;User&gt; myUsers</code> and a list <code>List&lt;PerfLoc&gt; myPerfLoc</code>. Now I want to find all users of <code>myUsers</code> which have a certain <code>PerfLoc</code>. So I have multiple values in <code>myUsers</code> and multiple values in <code>myPerfLoc</code>. The exercise now is to make a match. I thought about some sort of pseudeo code like this:</p>
  
  <pre><code>List&lt;User&gt; filteredUser = new List&lt;User&gt; ();
  foreach(PerfLoc currentPerfLoc in myPerfLoc){
      filteredUser += myUsers.Any(u =&gt; u.PerfLoc == currentPerfLoc.Number);
  }
  filteredUser = filterUser.Any(u =&gt; u.Active = true);
  filteredUser.Sort();
  </code></pre>
  
  <p>Here I'd have sorted after <code>PerfLoc</code> and <code>Active</code> (= multiple criteria) and also after multiple values (list of <code>PerfLoc.Number</code>). I saw some <em>from, where, select</em> LINQ expressions and thought that my approach above could be expressed in a shorter way. How would you express that?</p>