Asp.net 5 Mvc 6 Renames In Beta 8
The recent beta 8 release of ASP.NET 5 MVC 6 has resulted a few renames.
This post contains some of the ones I have come across so far.
##Sessions
Beta 8 brings back the HttpContext property which replaces the Context property.
HttpContext.Session.SetString("example1", "myString");
Old(er) | Beta 8 |
---|---|
Context | HttpContext |
Context.Session.Set(String, byte[]) | HttpContext.Session.SetInt32(String, byte[]) |
Context.Session.Get(String) | HttpContext.Session.Get(String) |
Context.Session.SetString(String, String) | HttpContext.Session.SetString(String, String) |
Context.Session.GetString(String) | HttpContext.Session.GetString(String) |
Context.Session.SetInt32(String, int) | HttpContext.Session.SetInt32(String, int) |
Context.Session.SetInt32(String) | HttpContext.Session.SetInt32(String) |
##Diagnostics
Error pages provided by diagnostics have better names to avoid confusion.
app.UseDeveloperExceptionPage();
Old(er) | Beta 8 |
---|---|
app.ErrorHandler() | app.UseExceptionHandler() |
app.ErrorPage() | app.UseDeveloperExceptionPage() |