title: FindAll Vs Where
body: <p>I have an <code>IEnumerable&lt;T&gt;</code> that I wanted to filter based on a LINQ predicate. I tried using <code>Where</code> on the <code>IEnumerable</code> as I normally do, but this time I stumbled upon something interesting. When calling Where on the <code>IEnumerable</code>, with the predicate, i get an empty list in return. I know it has to produce a list with two items in it. If I instead use <code>FindAll</code>, with the same predicate, it then produces the correct result.</p>
  
  <p>Can anyone explain to me, why this is happening? I always thought that <code>Where</code> was kind of a lazy version of <code>FindAll</code>, that also returned an <code>IEnumerable</code> instead of a <code>List</code>. There must be more to it than that? (I have done some research, but to no avail.)</p>
  
  <p>Code:</p>
  
  <pre><code>IEnumerable&lt;View&gt; views = currentProject.Views.Where(
                      v =&gt; v.Entries.Any(e =&gt; e.Type == InputType.IMAGE || e.Type == InputType.VIDEO));
  
  IEnumerable&lt;View&gt; views = currentProject.Views.FindAll(
                      v =&gt; v.Entries.Any(e =&gt; e.Type == InputType.IMAGE || e.Type == InputType.VIDEO));
  </code></pre>