After the creation of any Asp .Net Core project in every situation, we find some pre-defined files and folders are automatically generated. It is really important to have basic knowledge about those files and folder is important before working on an asp .net core project. So in this article, we are going to discuss the infrastructure of our project. Let's get started.
In the above picture, you can clearly see the Solution name "AspCoreUsingVS2019", in the braces, it is written (1 of 1 project ). It indicates that my solution has one project. In the bold font we see the same name as the Solution name i.e. "AspCoreUsingVS2019", but it is the project name(we can give a different name to our solution while creating the project, later we can add multiple projects in the solution also).
Inside the project, we see a list of files and folders i.e. Connected Services, Dependencies, Properties, wwwroot, Controllers, Models, Views, appsettings.json, Program.cs, Startup.cs.
Connected Services
The third-party configurations like WCF, Web API, and Azure cloud are connected with our project through this.
Dependencies
Here we can configure the packages and references that we need for our project.
To add references, Right-click on Dependencies->Add References
To add packages from NuGet Package Manager, Right-click on Dependencies->Manage NuGet Packages... -> search for your desired Package -> Install
Properties
By expanding it we can see the launchSettings.json file, which has all project settings like URL, Environment, profile, etc...
Version, copyright, Culture, etc settings can be done here in the Properties.
wwwroot
All the static and dynamic project resources folder/files like CSS, HTML, Images, and Scripts are stored in the wwwroot folder.
Controllers
The Controllers folder contains all the controller classes. The controller class contains public methods (Action Methods) that we can access through the browser.
Models
The Models folder contains all the model classes that are responsible for data logic.