Entity Framework Find vs. Where

The point is that Find() starts by searching in the local cache of the context and then, if no match, sends a query to the DB.

Call to Where() always sends a query to the DB.

With EF 4, I used to think that SQL generated by Find() was too complex and, in some cases, led to a performance issue. So I always use Where() even with EF 5. I should check the SQL generated by Find() with EF 5.

So on paper, Find() is better because it uses the cache.

Leave a Comment