MVC 5 Interview Questions and Answers
1. What is Asp.Net MVC5 and it's new features?
ASP.NET MVC is a server-side web framework for building dynamic, data-driven web applications. The ASP.NET MVC 5 Framework is the latest update from Microsoft’s MVC web platform. It provides an extensible, high-quality programming model that allows you to build dynamic, data-driven websites, focusing on a cleaner architecture and test-driven development.
The below are some of the new features in MVC 5
Web API 2
OAuth 2.0 Authorization in MVC 5
2. What is Scaffolding?
Visual Studio 2013 includes a new Scaffolding Framework for ASP.NET MVC 5 and the ASP.NET Web API 2. ASP.NET Scaffolding is a code generation framework for ASP.NET Web applications. It generates code for CRUD operations using the Entity Framework models. This is a simple way to create an ASP.NET MVC application with all the operations.
When you add Scaffolding to your application then the code generation will be auto-generated as below.
Scaffolding should be created as below
Scaffolding view should automatically be created as below
Scaffolding auto code generated as below