ASP.Net core is a free and an open-source managed computer software framework that is used in Windows, Linux and macOS operating systems. This project as all of us know is primarily developed by the Microsoft and is released under the MIT license. The purpose of .Net core is to build different types of web applications in the .Net framework.
.Net core 3.1:
Microsoft is very pleased to announce the release of .Net core 3.1. We can call this .Net core 3.1 a refined and fixed form of .Net core 3.0 which was just released two months ago. 3.1 is a small and short release that focuses on the key improvements in Blazor and Windows desktop. This version has been released in the month of December.
What is new in .Net core 3.1?
Following are the features of .Net core 3.1.
It is a long term supported (LTS) release that will be supported for three years:
“The most significant feature is that .NET Core 3.1 is an long-term supported (LTS) release and will be supported for three years,” said program manager Richard Lander. “As we’ve through in the past, we desired to take our time before releasing the next LTS release. The extra two months (after .NET Core 3.0) allowed us to select and implement the right set of developments over what was already a very stable base .NET Core 3.1 is now prepared to be used anywhere your mind or business need takes it.”
Recommended ASP.NET Core with Angularjs Online Course
- Build a full-stack web app with ASP.NET Core, Entity Framework Core and Angular
- Implement a Clean & Decouple Architecture.
- Properly implement the repository and unit of work patterns.
- Troubleshoot common runtime errors.
- Test APIs using PostMan.
- Integrate ASP.NET MVC/Core with Angularjs.
- Understand and apply the Dependency Inversion Principle (DIP).
- Use the new dependency injection feature in ASP.NET Core.
- Build APIs with ASP.NET Core
- and more….
It has a partial class support feature for Razor components:
Razor components are now generated as partial classes. You can author the code for a Razor module using a code-behind file defined as a partial class instead of describing all the code for the module in a single file.
Pass parameters to top-level components:
Blazor Server apps can now pass parameters to top-level modules through the early render. Previously you could only pass parameters to a top-level component with RenderMode.Static. Over this release, equally RenderMode.Server and RenderModel.ServerPrerendered are now supported with this update. Any specified parameter values are serialized as JSON and included in the initial response.
New component tag helper:
This is said to ease the use of Razor components from views and pages, which previously required rendering a component from a view or page using the RenderComponentAsync HTML helper. The new component tag helper streamlines the syntax for executed components from pages and views. Simply require the type of the component you request to render as well as the wanted render mode. You can also identify component parameters using attributes prefixed with param-.
It also prevents default actions for events in Blazor apps:
You can now prevent the default action for events in Blazor apps using the new @oneventname:preventDefault directive attribute.
Detailed errors during Blazor app development:
This helps developers get detailed error information in order to troubleshoot and fix issues. Blazor apps now display a gold bar at the bottom of the screen when an error occurs. During progress, in Blazor Server apps, the gold bar will straight you to the browser support where you can see the exception that has occurred.
It provides support for shared queues in HttpSysServer:
In adding to the prevailing behavior where HttpSysServer generated anonymous request queues, we’ve added to ability to create or attach to an existing named HTTP.sys request queue. This should enable scenarios where the HTTP.Sys controller process that owns the queue is independent to the listener process making it possible to preserve existing connections and enqueued requests between across listener process restarts.
Breaking changes for SameSite cookies:
This release informs the behavior of SameSite cookies in ASP.NET Core to conform to the latest values being enforced by browsers.
Another feature that ASP.NET Core 3.1 has is that it stops event propagation in Blazor apps:
Use the new @oneventname:stopPropagation directive attribute to stop event transmission in Blazor apps.
How to get started with the new and refined .Net core 3.1?
In order to get started with the ASP.NET Core 3.1, what is required of you is to immediately install the .NET core 3.1 SDK. If you are using visual studio on Windows then you’d only need to install the visual studio 2019 16.4. Upon installing the visual studio 2019 16.4, it is also going to install the .NET Core 3.1. This means that you don’t have to install both of these separately.
How can I upgrade an existing project?
If a user is using ASP.NET Core 3.0 and wants to upgrade the existing project to ASP.NET Core 3.1 then what he needs to do is follow these steps.
- The first step is to click on the prerequisites.
- Then you have to click to update .NET Core SDK version in global.json.
- After that you need to update the target framework.
- Then you need to update package references.
- After updating the package references, you need to update Docker images.
- Then react to samesite cookie changes.
- Then you need to review 3.0-to-3.1 breaking changes across .NET Core, ASP.NET Core, and Entity Framework Core.
Lastly if you need to upgrade an existing ASP.NET Core 3.1 Preview 3 project to 3.1 you have to update all Microsoft.AspNetCore. and Microsoft.Extensions. package references to 3.1.0. That’s it! You should now be all set to use .NET Core 3.1. So if you’re using the ASP.NET core 3.0 then don’t wait for a single second and upgrade to the ASP.NET Core 3.1 now and start experiencing amazing and refined features of this web framework.
- ASP.NET Core Tutorial – Application with CRUD Operations
- ASP.NET Core Tutorial for Beginners
- ASP.NET Core Web API Tutorial – Part 1
- ASP.NET Core Web API Tutorial – Part 2
- ASP.NET Core Web API Tutorial – Part 3