ASP.NET MVC Interview Questions Part-1
What is ASP.NET MVC?
ASP.NET MVC is a web application framework developed by Microsoft that implements the model–view–controller (MVC) pattern. It is no longer in active development. MVC is a design pattern used to decouple user-interface (view), data (model), and application logic (controller).
The appsettings. json file is an application configuration file used to store configuration settings such as database connections strings, any application scope global variables, etc.
The wwwroot folder is intended to store static files in an ASP.NET Core application. This means CSS, JS, images, icons, Html ,etc.
Program.cs is where the application starts. Program.cs class file is entry point of our application and creates an instance of IWebHost which hosts a web application.
ConfigureServices provides an dependencies by injecting dependency services.And the Configure methods add those dependencies to middleware.
MVC stands for Model, View, and Controller. MVC separates an application into three components - Model, View, and Controller.
Model: Model represents the shape of the data.
View: View in MVC is a user interface. View display model data to the user and also enables them to modify them.
Controller: The controller handles the user request. Typically, the user uses the view and raises an HTTP request, which will be handled by the controller. The controller processes the request and returns the appropriate view as a response.
Razor is nothing but view engine in which we can write C# code and html together.And the extension of this file is .cshtml.
No comments:
Post a Comment