In Chapter 3, Developing Dockerized .NET Framework and .NET Core Applications, I extracted the NerdDinner home page into a separate component, which enabled the rapid delivery of UI changes. Now I'm going to make some more fundamental changes, breaking down the legacy application and modernizing the architecture.
I'll start by looking at a performance issue in the web application. The data layer in NerdDinner uses Entity Framework (EF), and all database access is synchronous. A lot of traffic to the site will create a lot of open connections to SQL Server and run a lot of queries. Performance will deteriorate as the load increases, to the point where queries time out or the connection pool is starved and the site will show errors to the users.
One way to improve this would be to make all the data-access methods async, but that's an invasive...