20.03.2024 | 

Webinar: .NET Native AOT – Data Access ohne EF Core, dafür mit Humble Objects

Das Interesse an Native AOT ist groß, seitdem es mit .NET 8 möglich ist, ASP.NET Core-Apps direkt als Maschinencode auszuliefern. Ein großes Problem besteht jedoch darin, dass Entity Framework Core derzeit nicht mit Native AOT kompatibel ist. In diesem Vortrag untersuchen wir Alternativen zur Gestaltung des Data Access Layers in Native-AOT-Projekten: Wir betrachten unterschiedliche Micro-ORMs und sehen uns an, wie wir mit Humble Objects (DB-Sessions) unsere Business-Logik klar von der Datenzugriffsschicht zu trennen. Das Ziel ist, eine Struktur zu schaffen, die fast so aussieht, als würden wir EF Core verwenden. Dabei gehen wir auch detailliert auf Patterns wie „Unit of Work“ und „Repository“ ein und erörtern, wie diese gewinnbringend in unserer Codebasis eingesetzt werden können.

Mehr Beiträge zu .NET Core, AOT, Entity Framework
Kenny Pflug ist Consultant bei Thinktecture und spezialisiert auf Architektur und Design von verteilten Systemen mit ASP.NET Core.


Gøran Homberg

Gøran Homberg

Gøran Homberg ist Consultant bei Thinktecture und arbeitet mit unseren Kunden bzgl. deren Anforderungen, Projektansätzen und zugehörigem Projekt-Management.



Weitere Artikel zu .NET Core, AOT, Entity Framework

Database Access with Sessions

Data Access in .NET Native AOT with Sessions

.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.
Old computer with native code

Native AOT with ASP.NET Core – Overview

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.

Optimize ASP.NET Core memory with DATAS

.NET 8 introduces a new Garbage Collector feature called DATAS for Server GC mode - let's make some benchmarks and check how it fits into the big picture.

Incremental Roslyn Source Generators: High-Level API – ForAttributeWithMetadataName – Part 8

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.

.NET 7 Performance: Regular Expressions – Part 2

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 Performance: Introduction and Runtime Optimizations – Part 1

.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.