title: C#, filtering IEnumerable with multiple .Where() statements, performance hits
body: <p>I have an IEnumerable, and I'm applying multiple filters to it via .Where expression. My code looks something like this</p>
  
  <pre><code>public List&lt;MyObject&gt; FilteringFunction(List&lt;MyObject&gt; listToFilter, List&lt;Filter&gt; filters)
  {
      // A dirty way to have an enumerable instead of List
      var enumerableToFilter = listToFilter.Where(x =&gt; true);
  
      foeach(var filter in filters)
      {
          enumerableToFilter = enumerableToFilter.Where(x =&gt; x.Value.Contains(filter.Value));
      }
  
      return enumerableToFilter.ToList();
  
  }
  </code></pre>
  
  <p>Am I going to iterate through my collection only once? (As I would have only one database call with LINQ to SQL)</p>