.NET 8 brings Native AOT to ASP.NET Core, but many frameworks and libraries rely on unbound reflection internally and thus cannot support this scenario yet. This is true for ORMs, too: EF Core and Dapper will only bring full support for Native AOT in later releases. In this post, we will implement a database access layer with Sessions using the Humble Object pattern to get a similar developer experience. We will use Npgsql as a plain ADO.NET provider targeting PostgreSQL.
Archive: our articles
Category: .NET CORE
Originally introduced in .NET 7, Native AOT can be used with ASP.NET Core in the upcoming .NET 8 release. In this post, we look at the benefits and drawbacks from a general perspective and perform measurements to quantify the improvements on different platforms.
In this article we will see how to reduce the resource consumption of a Source Generator when running inside an IDE by redirecting the code generation to RegisterImplementationSourceOutput.
As a backend developer you have to implement some kind of periodically running background jobs from time to time. Most widely used tools I see are timers, tasks, semaphores, half dozens of booleans and enums to keep the state. Depending on the complexity of the code, understanding it can be quite adventurous. Alas, almost none of the developers I asked about reactive extensions (Rx.NET) know that they even exist.
With the version 4.3.1 of Microsoft.CodeAnalysis.* Roslyn provides a new high-level API – the method “ForAttributeWithMetadataName”. Although it is just 1 method, still, it addresses one of the biggest performance issue with Source Generators.
There is this popular quote by Jamie Zawinski: Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.”
In this second article of our short performance series, we want to look at the latter one of those problems.
.NET 7 is fast. Superfast. All the teams at Microsoft working on .NET are keen to improve the performance and do so every year with each new .NET release. Though this time the achievements are really impressive.
In this series of short articles, we want to explore some of the most significant performance updates in .NET and look at how that may affect our own projects. This first article is taking a deep look under the hood of the compiler and the runtime to look for some remarkably interesting and significant updates.