Skip to main content

Posts

Showing posts with the label mvc 6 new features

How to configure connection string in MVC 6 in vNext?

You can configure your connection string in " appsettings.json ". i.e. In the below MVC 6  appsettings.json file. Here is  two connections sting, one is default connection " DefaultConnection " and send one is " MVC6DemoContext ". You can see in below JSON file. appsettings.json {   "ApplicationInsights" : {     "InstrumentationKey" : ""   },   "Data" : {     "DefaultConnection" : {       "ConnectionString" : "Server=(localdb)\\mssqllocaldb;Database=aspnet5-WebApplication1-b2a87fa4-3c62-4931-8248-76a6b22a08d1;Trusted_Connection=True;MultipleActiveResultSets=true"     },     "MVC6DemoContext" : {       "ConnectionString" : "Server=myServer;Database=MVC6_Demo;User ID=sa;Password=demo-password; Trusted_Connection=True;MultipleActiveResultSets=true; Integrated Security=false;"     }   },  ...

MVC 6 tag helpers vNext intelligence

An Introduction to Tag Helpers Tag Helpers is the biggest feature of MVC 6 that help us to creating and rendering HTML elements in Razor views. From ASP.NET documentation, "Tag Helpers enable server-side code to participate in creating and rendering HTML elements in Razor files." Example for Using Tag Helpers, Before using Tag Helpers in MVC razor view, @model MVC6Protal.Models.User @ using (Html.BeginForm()) {     < div >          @ Html.LabelFor(m => m.Name, "User Name " )         @ Html.TextBoxFor(m => m.Name)     </ div >     < div >         @ Html.LabelFor(m => m.Email, "User Email " )         @ Html.TextBoxFor(m => m.Email)     </ div >     < input type ="submit" value ="Create"...

13 New Key Features of MVC 6 - [vNext Architecture]

“What”? ‘Why” and “When”? This article introduces to 13 new key Features for MVC 6 and Roslyn Compiler and let’s explore in detail without writing the code. Try the live example of the vNext code shown in this page! Key Features as following as, =>  MVC 6   Added new cloud computing optimization system of MVC , web API, SignalR and entity framework. => The Microsoft  make a bundle of MVC, Web API, WebPages, SignalR , that bundle we called  MVC 6 . => In MVC 6, Microsoft removed the dependency of system.web.dll from MVC 6 because it's so expensive. Typically  it consume 30K memory per request/response. => Right now, in MVC 6 consume 2K  memory per request response. It's too small memory  consume. => Most of the problem solved using the Roslyn Compiler . => Added a Start-up class that replaces to global.asax file. => The Session state and caching adjust our behavior dependin...