.Net core MVC project structure explained step by step part 2

 In previous article "Net core MVC project structure explained step by step part 1" I have discussed about creating MVC .net core project and its basic structure. In this article i will discuss MVC .net core project structure further.

 




 

 

Following is the project structure which i will be discussing in this article.

Project structure detailed

 

 

wwwroot: This is the directory where we can store projects static files for example css files, Javascript files, images, or any other binary files required for the project.

Controllers: We can add the controllers of the project. Controllers are responsible for handling user request, do the processing and provide the appropriate response to user request. 

Models: you can store your model files and dbcontext in this folder to add your business logic in application.

Views: In this directory we can add views in  the form of chtml files(Razor engine) 

appsetting.json: In this file we can configure the custom attributes required for the project for fine tuning of the application.

Startup.cs: In this file we can configure application level settings for eg. dependency Injection configuration, dbcontext initialization or custom middle ware registration

startup.cs


Program.cs: In this file you can configure the hosting related configuration how your application will behave on initialization.

program.cs

This is the basic structure needed in the MVC .net core application. Hope you have understand the structure.

Comments

Popular posts from this blog

Angular User Session Timeout example step by step

Implement Nlog in .Net core MVC application part 1

I have created an application to extract text from image using AI

Implement Logging in CSV file using Nlog in .net core MVC application- part 2

Create Chat bot application using Python, Streamlit and Gemini AI