title: LINQ "Where" Statement Doesn't Work
body: <p>I'm a bit confused why this piece of code produces 2 records in a list (acts appropriately):</p>
  
  <pre><code>var historiesToRemove = new List&lt;WorkHistory&gt;();
                  foreach (var history in this.WorkHistories)
                  {
                      if (history.Tool.Equals(item))
                      {
                          historiesToRemove.Add(history);
                      }
                  }
  </code></pre>
  
  <p>While this piece of code produces an empty list:</p>
  
  <pre><code>var historiesToRemove = this.WorkHistories.Where(history =&gt; history.Tool.Equals(item)).ToList();
  </code></pre>
  
  <p>Any ideas why could this happen?</p>
  
  <p><strong>REASON:</strong></p>
  
  <p>I didn't properly implement IDbSet's IQueryable properties. This made my LINQ act wrong.</p>