Yesterday, the .NET community announced the second preview of .NET Core 2.2 and the Entity Framework 2.2. They also released C# version 7.3 and ML.NET 0.5.
Let’s have a look at the highlights and features of each of these announcements.
.NET Core 2.2 Preview 2 can be used with Visual Studio 15.8, Visual Studio for Mac and Visual Studio Code. Following are two highlights of this release.
The tiered compilation is enabled by default. The tiered compilation was available as part of the .NET Core 2.1 release. During that time, one had to enable tiered compilation via application configuration or an environment variable. It is now enabled by default and can be disabled, as needed.
In the image below, the baseline is .NET Core 2.1 RTM, running in a default configuration, with tiered compilation disabled. The second scenario has tiered compilation. One can see a significant request-per-second (RPS) throughput benefit with tiered compilation enabled.
The numbers in the chart are scaled so that baseline always measures 1.0. Such an approach makes it very easy to calculate performance changes as a percentage. The first two tests are TechEmpower benchmarks and the last one is Music Store, a frequent sample ASP.NET app.
.NET Core 2.2 is supported on the following operating systems:
Read about the .NET Core 2.2 Preview 2 in detail, on Microsoft blog.
This preview includes a large number of bug fixes and two additional important previews, one is a data provider for Cosmos DB and the second one, new spatial extensions for .NET’s SQL Server and in-memory providers.
This new provider enables developers (familiar with the EF programming model) to easily target Azure Cosmos DB as an application database. It also includes global distribution, elastic scalability, ‘always on’ availability, very low latency, and automatic indexing.
This implementation picks the NetTopologySuite library that the PostgreSQL provider uses as the source of spatial .NET types. NetTopologySuite is a database-agnostic spatial library that implements standard spatial functionality using .NET idioms like properties and indexers.
The extension then adds the ability to map and convert instances of these types to the column types supported by the underlying database, and usage of methods defined on these types in LINQ queries, to SQL functions supported by the underlying database.
Read more about the Entity Framework Core 2.2 Preview 2 on the Microsoft blog.
C# 7.3 is the newest point release in the 7.0 family. Along with new compiler options, there are two main themes to the C# 7.3 release
New features that support the theme of better performance for safe code:
The new compiler options in C# 7.3 are:
Read more about the C# 7.3 in detail in its documentation notes.
The .NET community released ML.NET version 0.5. ML.NET is a cross-platform, open source machine learning framework for .NET developers.
This version release includes two key highlights:
Starting from this version, the community plans to add support for Deep Learning in ML.NET. Following this, they introduced the TensorFlowTransform which enables taking an existing TensorFlow model, either trained by the user or downloaded from somewhere else, and get the scores from the TensorFlow model in ML.NET.
This new TensorFlow scoring capability doesn’t require one to have a working knowledge of TensorFlow internal details. The implementation of this transform is based on code from TensorFlowSharp.
One can simply add a reference to the ML.NET NuGet packages in thier .NET Core or .NET Framework apps. Under the covers, ML.NET includes and references the native TensorFlow library which allows writing code that loads an existing trained TensorFlow model file for scoring.
The new ML.NET API offers more flexible capabilities than what the current LearningPipeline API offers. The LearningPipeline API will be deprecated when this new API is ready.
The new ML.NET API offers attractive features which aren’t possible with the current LearningPipeline API. These include:
Strongly-typed API takes advantage of C# capabilities. This helps errors to be discovered in compilation time along with improved Intellisense in the editors.
Better flexibility: This new API provides a decomposable train and predict process, eliminating rigid and linear pipeline execution.
Improved usability: This new API makes direct call to the APIs from user’s code. No more scaffolding or insolation layer creating an obscure separation between what the user/developer writes and the internal APIs. Entrypoints are no longer mandatory.
Ability to simply score with TensorFlow models: One can also simply load a TensorFlow model and score by using it without needing to add any additional learner and training process.
Better visibility of the transformed data: User’s have better visibility of the data while applying transformers.
As this API inclusion will be a significant change in ML.NET, the community has started an open discussion where users can provide their feedback and help shape the long-term API for ML.NET. Users can share their feedback on ML.NET GitHub repo.
Read more about ML.NET 0.5 in detail, on Microsoft blog.
Task parallel library for easy multi-threading in .NET Core [Tutorial]
Use App Metrics to analyze HTTP traffic, errors & network performance of a .NET Core app [Tutorial]
Microsoft’s .NET Core 2.1 now powers Bing.com