Thursday, April 8, 2021

ASP.NET MVC Interview Questions Part-1

 

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). 






Why do we need appsettings.json?

 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.




Some default values.




What is JSON?

JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax. It is commonly used for transmitting data in web applications (e.g., sending some data from the server to the client, so it can be displayed on a web page, or vice versa.For example "version" - "1.1.10".



What kind of things go into wwwroot?

The wwwroot folder is intended to store static files in an ASP.NET Core application. This means CSS, JS, images, icons, Html ,etc.







What does program.cs file do?

 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.







What does ConfigureService and Configure method do in Startup.cs?

ConfigureServices provides an dependencies by injecting dependency services.And the Configure methods add those dependencies to middleware.





How is the flow of MVC?

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.

                 



What are Razor views?

Razor is nothing but view engine in which we can write C# code and html together.And the extension of this file is .cshtml.



For more understanding watch below video :

No comments:

Post a Comment

Function in SQL -part 8

  In this blog we are going to understand  Sql function.   FUNCTION: A function is a database object in SQL Server. It accepts only input pa...