ASP.NET MVC Interview Questions Part - I Day 25
ASP.NET is A web application framework to develop website which can run on Map, Linux and any other platforms.
ASP.NET MVC is nothing but architecture pattern.
The MVC model also provides full control over HTML, CSS, and JavaScript.
The Model is the part of the application that handles the logic for the application data.(Has a business logic)
The View is the part of the application that handles the display of the data.(Has a look an feel UI)
The Controller is the part of the application that handles user interaction.(Connect the model on the view)
The appsettings. json file is an application configuration so this configuration for example, configuration like connection string and version number, so all this are appsettings.json.
Appsettings.json file has parameter configuration.
The wwwroot we store static files in your project go into this folder.
These are assets that the app will serve directly to clients, including HTML files, CSS files, and JavaScript files.
The wwwroot folder is the root of your web sites.
wwwroot folder :
The Startup.cs file is executed after program.cs file.
The Startup.cs file is used for registering services and injection of modules in HTTP pipelines.
The Startup.cs contains the ConfigureService and Configure.
The ConfugureService method gets call before Configure method.
The ConfigureServices method is used to add services in DI(Dependency Injection) container.
The Configure method is used to configure HTTP request and services.
The MVC is first hit come's to the controller and controller goes to the model and loads the data and put in the view and that's view is render then as HTML an the browser.
- User requests are intercepted by Controller whether it is a URL request or any event raised by the user on the page.
- Then controller processes the user input and talks to the Model.
- Model prepares data and sends back to the Controller.
- Finally, controller hands over data back to the view and is displayed to the user.
Comments
Post a Comment