EF Core
12 articles tagged with EF Core.
GDPR data export and account erasure in an ASP.NET Core SaaS
Learn how to implement a GDPR data export and a real account erasure in a modular ASP.NET Core application, without breaking domain boundaries or other people's history.
7 min read
A billing module behind an adapter: Stripe that runs unconfigured
Learn how to keep Stripe inside one billing module in ASP.NET Core, with its own DbContext, a payment-gateway port and an adapter that lets the app run with no key at all.
8 min read
Signed outgoing webhooks in ASP.NET Core
Learn how to send signed outgoing webhooks from ASP.NET Core: a stable envelope, an HMAC signature a subscriber can verify, durable retries, delivery history and redelivery.
7 min read
An audit log that can't lie: building one in ASP.NET Core with the outbox
Learn how to build an ASP.NET Core audit log that records a change if and only if it committed, and an architecture test that keeps it complete as the product grows.
8 min read
A migration runner instead of Database.Migrate() at startup
Learn how to move EF Core migrations out of your services and into a small worker that runs once, exits, and gates everything else.
7 min read
Idempotent message handlers in .NET: deterministic IDs from the message ID
Learn how to make a .NET message handler idempotent by deriving the ids of the rows it writes from the id of the message it consumes.
7 min read
Optimistic concurrency with PostgreSQL xmin in EF Core
Learn how to let exactly one of several writers win the same row, without locks, using PostgreSQL's xmin column as an EF Core concurrency token, plus a claim and a lease.
7 min read
Testing EF Core repositories on a real PostgreSQL with Testcontainers
Learn how to test EF Core repositories against a real PostgreSQL started by Testcontainers, with the real migrations and one DbContext each to arrange, act and assert.
7 min read
Separating reads and writes in ASP.NET Core without MediatR
Learn how to split an ASP.NET Core API into a read side and a write side with plain interfaces, projections and a result type, chosen by HTTP verb, with no mediator in between.
8 min read
Domain events vs integration events in .NET, and the transactional outbox
Learn the difference between domain events and integration events in .NET, and how a transactional outbox on EF Core and PostgreSQL makes an event exist if and only if the change committed.
7 min read
Moving from Duende IdentityServer to OpenIddict in ASP.NET Core
Learn how to replace Duende IdentityServer with OpenIddict while keeping the same OpenID Connect shape for your gateway, your API and your other clients.
8 min read
Strongly typed IDs in C# with EF Core and PostgreSQL
Learn how to replace primitive int keys with strongly typed IDs in C#, and wire them into EF Core, HiLo sequences on PostgreSQL and your API controllers.
7 min read