NET 6 - MVC - Project Structure

Last modified: March 24, 2022

The Model-View-Controller (MVC) is an architectural pattern that separates an application into three main logical components: the model, the view, and the controller. Each has it's own tasks, e.g. View display UI whereas Controller controls flows.

The following folder structure is when you create an ASP.NET 6 MVC application in Visual Studio.

structure

wwwroot

The client files such as CSS, JavaScript live in wwwroot folder.

appsettings.json

appsettings.json is similar to web.config in traditional ASP.NET, where can configure the ASP.NET application such as logging.

Program.cs

An ASP.NET 6 application is a console application under the hood, where it create a host for web application. The main difference between ASP.NET 6 MVC and ASP.NET 5 MVC is, there is no start up file. Everything is in Program.cs startup