Entity Framework – IQueryable vs IEnumerable

Posted by:

Working on an architecture framework for a client of Liberty Fox, I discovered a little known caveat of the Entity Framework. If you implement the repository pattern (or any data access methodology), then I am sure you’ve created a method to retrieve data from the data source based on some business rules.

For Example:  public IEnumerable<User> GetActiveUsers()

This method, as you may have guessed, returns an enumerable of the active users in the system. Now, because of the simplicity of LINQ, you ...

Continue Reading →
2