Is the query generated by the Entity Framework valid for use in ADO?

3

I want to have a higher performance in a query that I perform in the system

Consequently using ADO is much faster than Entity Framework

What% of the% it generates when querying could be used to create a query or use with procedure ?

Or is it exactly the ADO that it generates that makes it slow?

    
asked by anonymous 05.11.2015 / 17:19

1 answer

4

The query that it generates when performing the query, could be used to create a procedure or use with ADO?

Yes.

The problem is that it is in a much more convenient format for manipulation by the Entity Framework than by a logic that you can develop.

Or is it exactly the query it generates that makes it slow?

Actually the query runs very fast. The problem is transliteration of a result line in an object.

There are a number of rules that the Entity Framework uses to perform this transformation, and there are also a number of techniques for optimizing speed, such as using Reflection to generate classes at runtime and saving time by defining objects in a static approach.

There is also the lazy load that makes this time increase considerably, since the Entity Framework needs to open a connection and run a query for each aggregate entity of the original entity.

Conclusion

Dapper was created just to solve this performance problem that you want to combat. I suggest you take a look instead of using pure ADO.NET.

    
05.11.2015 / 17:35