Perhaps you have a problem with the DB table with which your query is being executed. So, the first time you run EF, it compiles your query, creates an execution plan, etc. Therefore, when you use the second time, DB uses the cached version of your query. Try adding indexes to your table and see if that helps.
source
share