It is very necessary to know about folder structure of MVC. It will help you to add file in the recommended folder.
App_Data – This folder contains data files like
xml files etc.
App_Start – It contains class files which gets executed when application starts. Normally it is config files like
Content – It contains static files like
images and icon files.
Controllers – It contains class files which handle user’s request and response. All the controller file name ends with Controller word like
Models – It contains model class files which handles database task.
Scripts – It contains scripts file like
Views – It contains HTML files. There may be separate folder for each controller. For
HomeController.cs; there is Home folder inside View folder.
Shared – It is under view folder and it contains shared files like
master page layout etc. Shared folder content can be accessed by any controller.
Some Important Files
Global.json – This file is used for add dependencies or add external projects reference into your current project. It specifies the path where system should search for dependency folder.
Project.json – Project.json file in asp.net core is used to define project metadata, compilation information and dependencies.
Global.asax – It allows you to write code at application level events such as
Package.config – It is managed by NuGet to keep track of what packages and versions you have installed in the application.
Web.config – It contains application level configuration.
In the next chapter, you will learn: UI, Layout, Master Page with Razor Syntax and CSS in ASP.NET MVC