A CI/CD pipeline diagram showing database migrations deployed as a separate stage before application deployment, with idempotent scripts and managed identities.

Stop Running dotnet ef database update in Production

Running migrations on application startup causes race conditions, security risks, and deployment failures in production. This guide shows how to deploy EF Core migrations as a separate CI/CD stage using idempotent scripts, migration bundles, and zero-downtime strategies like the Expand-Contract pattern.

January 20, 2026 · 10 min

Optimistic vs. Pessimistic Concurrency in EF Core: A Conceptual Deep Dive

EF Core’s default optimistic concurrency model is a great starting point, but it’s not a silver bullet. When write contention heats up, its limitations can lead to performance bottlenecks and data integrity challenges. Understanding the trade-offs between optimistic and pessimistic concurrency is crucial for building robust, scalable applications. This article explores the conceptual costs and benefits of each strategy, helping you decide when to stick with the default and when to reach for explicit locking. ...

November 4, 2025 · 9 min
×