Table Inheritance with EF Core
IntroductionEF Core 7 finally delivered a long-sought desire: all of the three table inheritance patterns are now implemented. These are:Table Per Hierarchy (TPH) / Single Table Inheritance: all...
View ArticleA Generic Timeout Helper
Another post that hopefully may come in handy to someone!Some APIs, but not all, notably older ones, allow passing a timeout value for the maximum allowed duration of its completion. What for those...
View ArticleOn Architecture – Part 1: High Level Communication
IntroductionThis 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...
View ArticleThe Current Status of EF Core
IntroductionLast 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...
View ArticleASP.NET Core API Versioning
IntroductionWhen 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:Changes to the...
View ArticleEF Core Performance Optimisations
IntroductionWe 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...
View ArticleOn Architecture – Part 2: Data Storage and Access
IntroductionSecond post on a new series on software architecture. First one here, on high-level system communication. This time I’m going to talk a bit about data storage and how to access the...
View ArticleSoft Deletes with Entity Framework Core - Part 3
IntroductionLong ago, I wrote two posts on how to do soft deletes with EF Core. Back then, it was with version 2. Well, something (a lot!) has changed in the meantime, namely:Custom conventionsEventsSo...
View ArticleRead-Only Entities in EF Core
IntroductionOne feature that has been conspicuously missing from EF Core is read-only entities, meaning, the possibility to mark an entity type as read-only, in which case, no changes to its instances...
View ArticleSoft Deletes with Entity Framework Core – Bulk Deletes
IntroductionThis is post 4 on a series of posts on soft deletes with EF Core. On none of my posts on this series did I mention that these solutions do not work with bulk deletes, introduced in EF Core...
View ArticleSoft Deletes with Entity Framework Core – Wrap Up
Those that follow this blog probably know about my series of posts on soft-deletes with EF Core, which you can find here:Global query filtersSaving changesConventions and EventsBulk DeletesI decided to...
View ArticleEF Core Entity Validation
IntroductionAs you guys may know, Entity Framework "classic" used to do entity validation before saving changes. By default, it used the Data Annotations validator, but you could plug your own...
View Article.NET 8 Data Annotations Validation
IntroductionI wrote about entity validation in the past, the reason I'm coming back to it is that there are some changes in .NET 8, that I haven't revisited. Time for a refresher!.NET has featured a...
View ArticleCaching HttpClient Requests
IntroductionThe HttpClient class is Microsoft’s recommended approach for making raw HTTP calls in .NET. It allows you to send arbitrary HTTP requests (including headers) through a request/response...
View ArticleGetting Location and Weather from an IP Address
IntroductionThe concept of getting the location for a given IP address is not exactly new, and some posts have been written about it already. Still, I wanted to write about it because I will need it...
View ArticleChecking the Heath of an ASP.NET Core Application
IntroductionHaving a way to evaluate the health status of our system has been around since ASP.NET Core 2.2. In a nutshell, the idea is, you register a number of health checks, and you run them all at...
View ArticleBlog Maintenance
I updated some of the links in my blog, removed outdated/broken links, added a few others (friends, links collections). This will be the last thing I'll do before going on annual leave, be back by the...
View ArticleUsing MongoDB with Entity Framework Core Session
Yesterday I did a talk on a joint Porto.DATA and Azure & AI User Group Portugal event (thanks, Ivan Campos and Pedro Sousa, for inviting me!) on using MongoDB with EF Core. The slides are here...
View ArticleRate Limiting in ASP.NET Core
IntroductionRate limiting is sometimes known as throttling, even though they're not quite the same - rate limiting is more about fairness, making sure everyone gets a fair share (number of requests),...
View ArticleASP.NET Core Features
IntroductionRequest Features, or feature interfaces, offer a centralised way to access functionality that is commonly added by middleware in the pipeline. Features allow us to access information, or,...
View Article