Unsere Artikel

Kategorie: .NET CORE

.NET

Entity Framework Core – Inheritance – Table-Per-Type (TPT) Is Not Supported, Is It? (Part 2 – Database First)

In the previous post we have created 2 Entity Framework Core (EF Core) models with a code first approach. One model was using the Table-per-Hierarchy (TPH) pattern and the other one Table-per-Type (TPT). In this post we want to approach a more common scenario we see in customer projects: we are using the database first approach now.

All demos are on Github.

zum Inhalt >
.NET

Entity Framework Core – Inheritance – Table-Per-Type (TPT) Is Not Supported, Is It? (Part 1 – Code First)

With O/R mappers there are a few patterns how a class hierarchy can be mapped to a relational database. The most popular ones are the Table-Per-Hierarchy (TPH) and the Table-Per-Type (TPT) patterns. The Entity Framework Core 2.x (EF Core) officially supports the Table-per-Hierarchy pattern only. The support of Table-per-Type is in the backlog of the Entity Framework team, i.e. it is not (officially) supported yet. Nevertheless, you can use TPT with the current version of EF Core. The usability is not ideal but acceptable. Especially, if you have an existing database using TPT then this short blog post series may give you an idea how to migrate to EF Core.

zum Inhalt >
.NET

Entity Framework Core Performance – Beware Of N+1 Queries

After working with Entity Framework 6 (EF 6) for several years, a software developer can predict the SQL statements being generated by EF just by looking at the LINQ queries. With Entity Framework Core (EF Core) the SQL statement generation has changed – in some cases for the better, in others for the worse.

zum Inhalt >
.NET

.NET Core In Production – Changing Log Level Temporarily

When running the application in production then the log level is set somewhere between Information and Error. The question is what to do if you or your customer experiences some undesired behavior and the logs with present log level aren’t enough to pinpoint the issue.

zum Inhalt >
.NET

.NET Abstractions – It’s Not Just About Testing!

With the introduction of .NET Core we got a framework that works not just on Windows, but on Linux and macOS as well. One of the best parts of .NET Core is that the APIs stayed almost the same compared to the old .NET, meaning developers can use their .NET skills to build cross-platform applications. The bad part is that the static types and classes without abstractions are still there as well.

zum Inhalt >