Regarding the new EF5 auto-compiled query feature

I did some tests regarding the new feature of EF5 auto-compiled queries. The problem is that I do not see a difference in performance.

I did one project with .NET 4.0 and EF4.0 without using compiled queries. I did another project with .NET 4.0 and EF4.0 with compiled queries - there was a 50% performance improvement.

And then I tried to create a project with EF 5.0, which basically had no performance difference.

All projects were asp.net mvc (the first two were version 3, the latest version was version 4).

Am I missing something? Is there anything special I need to do to enable the auto compile feature? I just created an MVC 4 project with pre-build EF5 inside.

The request I'm testing with is rather complicated, with three associations and several filters inside.

thanks

+6
source share
2 answers

Auto-compiled queries are available in the real-time part of EF5 in the .NET Framework 4.5. If you run EF5 on the .NET Framework 4, requests are not automatically collected.

+2
source

Pawel

Thanks for answering. In fact, I downloaded .NET 4.5 from the MS website:

http://www.microsoft.com/en-us/download/details.aspx?id=30653

I installed it, I also had the target .NET 4.5 as a parameter on the project tab in Visual Studio, and it was installed. But when I look at assemblies, they are all 4.0.

I do not know why this is happening.

I also upgraded to alpha EF 6.0.

Performance does not improve at all.

+1
source

All Articles