Skip to main content

Posts

Showing posts from May, 2015

Difference between MVC 3, MVC 4, MVC 5, and MVC 6

ASP.NET MVC 3: 1.      MVC 3 introduced a popular new features that is called  Razor . 2.      MVC 3  introduced a new features that is called  bundling . 3.      MVC 3 Start supporting to multiple view(Razor) engines. 4.      MVC 3 introduced a popular new features that is called ViewBag dynamic property. 5.      MVC 3 introduced a popular new features that is called ActionResults Types. 6.      In MVC 3, added  separates the functionality approach over the JavaScript in the presentation layer  that is called to UX. 7.      MVC 3 start supporting to the  HTML 5  and  CSS 3 . 8.      MVC 3 added enhancement to validate a  model . 9.      MVC 3 improved the Dependency Injection by using the IDependencyResolver interface. 10.    MVC 3 added output caching for Partial views. ASP.NET MVC 4: 1.      MVC 4 introduced a popular new features that is called webapi  framework. and its work over the HTTP services . 2.     

What is the difference between each version of MVC 2, 3, 4, 5 and 6? (MVC Interview Questions)

MVC 6 ASP.NET MVC and Web API has been merged in to one. Dependency injection is inbuilt and part of MVC. Side by side - deploy the runtime and framework with your application Everything packaged with NuGet, Including the .NET runtime itself. New JSON based project structure. No need to recompile for every change. Just hit save and refresh the browser. Compilation done with the new Roslyn real-time compiler. vNext is Open Source via the .NET Foundation and is taking public contributions. vNext (and Rosyln) also runs on Mono, on both Mac and Linux today. MVC 5 One ASP.NET Attribute based routing Asp.Net Identity Bootstrap in the MVC template Authentication Filters Filter overrides MVC 4 ASP.NET Web API Refreshed and modernized default project templates New mobile project template Many new features to support mobile apps Enhanced support for asynchronous methods MVC 3 Razor Readymade project templates HTML 5

C# 6.0 New feature

New features in C# 6.0 We can discuss about each of the new feature but first list of few features in C# 6.0 Auto Property Initializer Primary Consturctors Dictionary Initializer Declaration Expressions Static Using await inside catch block Exception Filters Conditional Access Operator to check NULL Values 1. Auto Property initialzier Before The only way to initialize an Auto Property is to implement an explicit constructor and set property values inside it. public class AutoPropertyBeforeCsharp6 { private string _postTitle = string .Empty; public AutoPropertyBeforeCsharp6() { // assign initial values PostID = 1 ; PostName = " Post 1" ; } public long PostID { get ; set ; } public string PostName { get ; set ; } public string PostTitle { get { return _postTitle; } protected set { _postTitle = value; } } } After In C#