Entity Framework Performance and What You Can Do About It


https://www.red-gate.com/simple-talk/dotnet/net-tools/entity-framework-performance-and-what-you-can-do-about-it/

 

Summary:

The article, from 2015, discussed some performance enhancement techniques for optimizing entity framework generated sql calls.

Entity framework is an object relational mapping tool that allows developers to write classes which model their data, and the framework uses information from the class metadata to dynamically construct Sql statements to perform CRUD operations.  Performance of entity framework is generally known to be poor, so this article addresses some tricks and techniques for mitigating performance problems.  EF might be a useful tool to use for this project, to assist in potentially reducing refactor time.  One useful optimization, for example, is the "MultipleActiveResultSet"  connection property, which allows the caller to retrieve multiple distinct query results at once for a given connection, reducing round trips to the database.  They also recommend the use of caching whenever possible.  It might not be a bad idea to explore some research on using a high availability in-memory cache such as redis.