.NET 5.0 is entering the home straight

Even if Microsoft had already dubbed the eighth preview version in August 2020 as “Feature Complete”, the first release candidate version that has now appeared contains many new functions for the web framework ASP.NET Core Blazor and the OR-Mapper Entity Framework Core. The RC1 version is available with a go-live license, which means that use in productive software is officially permitted by Microsoft.

Blazor now offers a component that renders only the visible elements from a set of objects. When rendering in Blazor WebAssembly-based applications, developers can now basically choose whether a static HTML page should be generated in advance. Microsoft has significantly improved the execution speed of Blazor WebAssembly overall (cf. Performance measurements in the associated blog entry).

JavaScript code that previously could only be integrated globally can now be isolated in modules. Uploading files allows the new component . Blazor also now supports the ontoggle browser event for the tag


Microsoft now binds as standard in all project templates for ASP.NET Core WebAPIs the community package Swashbuckle.AspNetCore for the Open API Specification (OAS) of the services. When starting a WebAPI project in the Visual Studio debugger, the OAS help page opens automatically.

The ORM mapper gets another big boost in the first release candidate. Particularly noteworthy is the abstraction of N: M intermediate tables. Until now, developers had to model N: M relationships in the object model as in the database model as two 1: N relationships. Now the abstraction known from the classic Entity Framework returns that two objects are allowed to have a many-to-many relationship and the OR mapper transparently maps this onto an intermediate table. This particularly facilitates the migration of existing applications from Entity Framework 6.x.

A .NET class can now be the basis for several entity types thanks to Indexer Properties. Such shared type entities allow tables to be mapped from the database at runtime of the application that did not exist at the time of development. The previously possible mapping of types to any SQL commands (defining queries) is with ToSqlQuery()become more powerful.

Another new feature is that tables with ExcludeFromMigrations() Exclude from schema migrations. The OR mapper now carries out schema migrations in transactions. Developers can view pending migrations with a command line command.

Microsoft has also added events that are triggered when saving: SavingChanges(), SavedChanges() and SaveChangesFailed(). Developers can influence the storage process in one SaveChangesInterceptor to take.

Microsoft has set the maximum size of commands sent to the database in a batch to 42. This number is not arbitrary, but is actually the optimum measured. Operators of an application can now call up the OR mapper’s event counters for diagnosis, using dotnet counters monitor Microsoft.EntityFrameworkCore.

The official blog entry for .NET 5.0 RC1 deals with what’s new in C # 9.0 and improvements in the JSON serializer System.Text.Json. Another blog post looks at the changes in the Entity Framework Core.

The final version of .NET 5.0 is scheduled for November 10, 2020 as part of the virtual .NET Conf appear. heise developer, iX and dpunkt.verlag will also organize an online conference on the innovations of .NET 5.0 together with on December 3rd. The associated website will go online shortly.


To home page