Development With A Dot
Blog on development in general, and specifically on .NET. Created and maintained by Ricardo Peres.
-
EF Core Performance Optimisations
We all know O/RMs aren't the fastest tools when it comes to loading data, and Entity Framework Core is surely no exception. After all, they need to do a lot of operations, such as translating LINQ queries to SQL, instantiating the right entities, hydrating them (setting their properties from the database-retrieved values), taking a snapshot for the change-tracking functionality, etc, etc. But there, however, are a few things that we can do to help speed things a bit! Here are a few tips for you to make the best usage of Entity Framework Core.
-
ASP.NET Core API Versioning
When you have an existing deployed REST API that you want to change, you generally need to be very careful. Why would you want to change it? There can be a number of reasons:
-
The Current Status of EF Core
Last year I blogged about the then current status of EF Core, its limitations, especially when compared with other O/RMs, such as NHibernate, one of my favourites. With the recent release of EF Core 8, it’s time to revisit that post.
-
On Architecture – Part 1: High Level Communication
This will be the first on a series of posts on software architecture. I will start by talking, without getting into too much detail, about some of the key decisions when it comes to communication between different top level components of an application, say, app servers or microservices. Later on I will discuss other aspects of a solution, such as:
-
A Generic Timeout Helper
Another post that hopefully may come in handy to someone!
-
Table Inheritance with EF Core
EF Core 7 finally delivered a long-sought desire: all of the three table inheritance patterns are now implemented. These are:
-
.NET 8 Dependency Injection Changes: Keyed Services
It has been quite some time since my last post on dependency injection (DI). In it I tried to talk a bit about the history of DI (or dependency resolution); now, a change is about to come in .NET 8: named (or keyed) services! Essentially, it consists of the possibility to register multiple times the same type under different names, and to inject a specific type/name combo.
-
Implementing React's UseState in C#
It's been a long time since my last post! Well, I'll try to change that. For now, I'll just leave something I was playing with: an implementation in C# of React's UseState function (or hook, in React terminology). This is merely for fun, but, hey, who knows if it might help someone!
-
Current Limitations of Entity Framework Core
Although EF Core seems to be the most popular ORM in the .NET world in these days – and I for sure won’t contradict it –, there are still some functionality missing, specially if we compare it with other ORMs that also exist, NHibernate coming obviously to my mind. This post is a reflection about that, it is in no way a comparison with other ORMs, in particular, NHibernate, it’s more a wish list for EF Core. I still follow and love NHibernate, and it’s still, in many ways, way ahead of EF Core, but that’s not what I’ll be writing about.
-
Using Generated Methods Instead of Reflection
It is a common thing to say that reflection is slow.You will find tons of posts saying this, and I generally tend to agree to them, although in most cases we generally don’t need to care that much – in fact, so many libraries and frameworks that we rely on daily depend on it!