How to Check for Pending Model Changes in EF Core
Change an entity, forget dotnet ef migrations add, and the code and the database quietly disagree until something fails. EF Core has a command that catches exactly that: dotnet ef migrations has-pending-model-changes. This guide shows both of its answers, what it actually compares, how to use its exit code in a build, and how it proves that a refactor of your model configuration changed nothing.
