Project structure
As mentioned in Chapter 7, on testing, folder structures can reveal an application’s intent and provide documentation as well.
In this section, we’ll learn about folder structures with ASP.NET web applications. We’ll also learn where to place code based on intent, such as where to place API code or Entity Framework code.
Understanding the project landscape
Every project has its own structure based on its type. For example, a Razor Page project layout is different from a Model-View-Controller (MVC) project or an API project.
Let’s examine what folders are in these common projects.
First, the following is an example of an ASP.NET Razor Page project:
Figure 11.1 – Common folder structure of a Razor Page project
Next is an example of an ASP.NET MVC project:
Figure 11.2 - Common folder structure of an MVC project
As we move through each project, we’ll explain...