Entity Framework 6.1 is over 100 times faster!

Recently I’ve been experiencing serious performance problems with Entity Framework. A query that was previously taking under a second to run was now taking over a minute to run. Taking the generated SQL and manually running it (either exactly or similar code) took 0.4 seconds to run. Adding some system.diagnostics stopwatches showed that that minute…