ASP.NET MVC Interview Questions Part 1

 

   Hey Guys I hope that you are Enjoying with my Blogs Writing and in this blog we will cover Interview question of ASP.NET MVC Core. So Lets Start....

                                   

     Q. What is ASP.NET MVC ?
  • ASP.NET MVC is an open-source cross platform web development to develop web application which is created by Microsoft. Its web development framework combines the features of MVC (Model-View-Controller) architecture.
  • Make it easier to manage complexity by dividing an application into the model, the view, and the controller.
  • When we create a new project then it is created automatically.
       Q. Why do we need Appsettings.json ?
  • Appsettings.json file an application configuration file which is used to store configuration settings such as database connection strings, version no etc.
  • When we create an ASP.NET core web application with an empty project template or MVC templet or Web API Template, then the visual studio automatically creates the appsettings.json file for us as show in the below image.
  • Its is exist in JSON format.

      Q. What is JSON ?
  • JSON is stands for JavaScript object notation it is commonly used to transmitting data in the web application.
  • Its exist in JSON format like name and value.       
    Q. What kind of things go in to wwwroot ?
  • All statics file in our project go into this folder.
  • Statics files like HTML, CSS, and images file etc. stored inside this folder.
      
       

      Q. What does program.cs ?
  • Program.cs file is the entry point of the application. This will be executed first when the application run, There is a public static void main method.
  • Whatever Coe you write inside that method will be executed in that same order.  
      
    Q. What does ConfigureService and Configure method do in Startup.cs ?

                          



    Q. How is the flow of MVC ?
  • MVC is an Architecture pattern which is stands for Model, View and Controller. 
  • If any End users sends the request to the browsers then it first hits to the Controller.
  • And take the data from the model and data put it into the view.
  • And view send as HTML to the Browsers .
  • For Example , Given Below image.


    Q. What are Razor views ?
  • Razor view is a markup syntax which helps us to write code of HTML and Server side in Web page using C# or VB.NET
  • Razor view Engine is general purpose templating engine.
  • The Razor view Syntax starts with @{..  Code...    }.



                                                                Thank You...

No comments:

Post a Comment