The structure of an ASP.NET MVC project is explained here. By default, Visual Studio builds the folder structure for the ASP.NET MVC framework as shown below.
Let's take a look at the importance of each folder.
App_Data
Application data files such as LocalDB,.mdf files, XML files, and other data-related files can be found in the App Data folder. Files in the App Data folder will never be served by IIS.
App_Start
Class files that will be executed when the programme begins can be found in the App Start folder. These are usually config files such as AuthConfig.cs, BundleConfig.cs, FilterConfig.cs, RouteConfig.cs, and so on. BundleConfig.cs, FilterConfig.cs, and RouteConfig.cs are included by default in MVC 5. The meaning of these files will be revealed later.Content
Static files such as CSS files, photos, and icons are stored in the Content folder. Bootstrap.css, bootstrap.min.css, and Site.css are used by default in MVC 5 applications.
Controllers
The Controllers folder includes the controllers' class files. A Controller is in charge of handling user requests and returning a response. All controller files must end in "Controller" according to MVC syntax. The controller will be discussed in the next segment.Fonts
The Fonts folder has custom font files of your application.
Models
Model class files can be found in the Models folder. Typically, model classes provide public properties that the application can use to store and manipulate application data.
Scripts
The Scripts folder includes the application's JavaScript or VBScript files. By default, MVC 5 comes with javascript files for bootstrap, jquery 1.10, and modernizer.
Views
The Views folder includes the application's HTML files. A view file is usually a .cshtml file in which HTML and C# or VB.NET code are written.
Every controller has its own folder in the Views folder. for example, All of the .cshtml files that will be made by StudentController will be in the View > Student folder.
All views shared among different controllers, such as layout files, are stored in the Shared folder under the View folder.
Global.asax
You can write code in the Global.asax file in response to application-level events like Application BeginRequest, application start, application error, session start, session end, and so on.
Packages.config
NuGet manages the Packages.config file, which keeps track of the packages and versions are installed in the application.
Web.config
Application-level settings are stored in the Web.config file.
It was the summary of project structure of ASP .Net MVC I hope you enjoyed and learned it, in case of any question, confusion or suggestion do comment below I would be happy to help you.

0 Comments