News

ASP.NET Core, .NET Core, EF Core 1.1 Updates In Preview

The first preview of the next incremental update to ASP.NET Core comes with a slew of new middleware components for speeding up app performance, while updates to .NET Core and Entity Framework Core come with mainly support additions.

A number of significant changes are coming to an incremental update for ASP.NET Core 1.1, which can be tested out in the initial preview release being rolled out this week. Highlights among the laundry list of changes is the addition of several middleware component for URL rewriting, response caching and compression, MVC filters, and providers for Azure App Service logging and Azure Key Vault. .NET Core is also being released, but with less ambitious plans.

One of the middleware components being highlighted is one for URL rewriting functionality. "This allows mapping a public URL space, designed for consumption of your clients, to whatever representation the downstream components of your middleware pipeline require as well as redirecting clients to different URLs based on a pattern," according to Jeffrey T. Fritz, a senior program manager with Microsoft's Developer Outreach Group, in a blog post. Fritz provides two examples, where http://example.com can be rewritten via the middleware to go to a www address, and where another rule can be applied to redirect any http request to an https request. This middleware component "can be configured using IIS standard XML formatted rules, Apache Mod_Rewrite syntax, or some simple C# methods coded into your application," he adds.

Response caching and response compression, used to optimize performance of web pages, are also done via middeleware. Response caching is done by adding Microsoft.AspNetCore.ResponseCaching and the Microsoft.Extensions.Caching.Memory packages to your app's Startup.ConfigureServices method. Response compression uses GZipCompression to compress responses, and it's added via the Microsoft.AspNetCore.ResponseCompression package.

Packages are also available in the preview for allowing apps to use Azure App Service for logging and diagnostics and Azure Key Vault for app configuration via Key Vault secrets. Other features detailed in the blog include:

  • WebListener server
  • View Components as Tag Helpers
  • Middleware as MVC filters
  • Cookie-based TempData provider
  • View compilation
  • Redis and Azure Storage Data Protection Key Repositories

.NET Core 1.1 Preview 1 has less ambitious goals, and is mainly a support release. "Its primary product theme is adding support for new operating system distributions," write Rich Lander, a Microsoft Program Manager with the Common Language Runtime team, in a separate blog post. He lists Linux Mint 18, OpenSUSE 42.1, macOS 10.12, and Windows Server 2016 among the distros, with Fedora 24 coming in a follow-up release later. Lander said that .NET Core 1.1 P1 also includes 1,380 APIs, listed in this document.

Like .NET Core 1.1 Preview 1, Entity Framework Core 1.1 Preview 1 is mainly concerned with stability issues. Even so, there's quite that's being trotted out for testers to check out. Included in this version is an improved EF Core LINQ provider, addition of DbSet.Find() API (used for querying entities based on primary key value), explicit loading of navigation property contents, and the addition of EntityEntry APIs. More details are in this blog post.

About the Author

Michael Domingo is a long-time software publishing veteran, having started up and managed several developer publications for the Clipper compiler, Microsoft Access, and Visual Basic. He's also managed IT pubs for 1105 Media, including Microsoft Certified Professional Magazine and Virtualization Review before landing his current gig as Visual Studio Magazine Editor in Chief. Besides his publishing life, he's a professional photographer, whose work can be found by Googling domingophoto.

comments powered by Disqus

Featured

Subscribe on YouTube