Development With A Dot
Blog on development in general, and specifically on .NET. Created and maintained by Ricardo Peres.
-
EF Core Entity Validation
Note: I wrote a post about Data Annotations validation here.
-
Soft 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:
-
Soft Deletes with Entity Framework Core – Bulk Deletes
This 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 7, but they really don't. That is because they rely on the change tracking mechanism and the bulk delete and bulk update functionality does not use it. But as with most of EF Core, there is certainly a way around it, and in this post I will present one, using IQueryExpressionInterceptor, one of the new interceptors introduced in EF Core 7. There is also an open ticket for adding an interceptor mechanism for bulk updates, which will probably also include bulk deletes.
-
Read-Only Entities in EF Core
One 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 (inserts, updates, deletes) will be allowed; data needs to be added to the database by other means. There is currently an open ticket to track this functionality, which has been open for quite some time. While it is currently not possible to achieve exactly this functionality, there are some possible workarounds that require very little coding.
-
Soft Deletes with Entity Framework Core - Part 3
Update: SoftDeleteConvention is now generic.
-
On Architecture – Part 2: Data Storage and Access
Second 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 data.
-
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: