When setting up a MVC Application the project file structure is as follows:
The main folders are:
Models hold the business logic. Models to represent the data used in the application will be created here.
The views that contain the HTML and other content. By default file _ViewStart.cshtml links to the _Layout.cshtml where the default Bootstrap HTML/CSS is set.
As a developer you can choose to make more folders inside Views to help structure your content.
Communicates between the View and Model. MVC uses a 'separation of concerns' approach to development. The controller controls which views are displayed and whether they need the support of the Model (not all pages will).
Location of all 'static' files such as client side Javascript, images and CSS files. May also include HTML files that don't require any .net server side logic
Other core files are:
As the name implies used for application settings. Is used to store database connection strings.
The main gateway to the application that holds the c# Main method. This calls Startup.cs
Configures the application using Dependency Injection and controls the order of the middleware methods to be run.
The default Startup.cs appears as follows:
Note: The use of app.UseEndpoints() differentiates this from Razor Pages. ASP.net Core 2 makes use of app.UseMvc().