Entity Framework Is Slow. It's Not EF's Fault. (opens in new tab)
Your API was quick in development. Then traffic picks up and a few endpoints start taking three seconds to respond. You open the code, see Entity Framework everywhere, and figure that's the culprit. Time to rip it out and write proper SQL. Don't. Before you throw away the thing saving you thousands of lines of code, look at what it's actually doing. Most of the time EF isn't slow. It's doing exactly what your code asked, and your code asked for something expensive. EF Does What You Tell It En...
Read the original article