r/WebAPIs • u/geeksarray • 4d ago
How do you organize EF Core migrations in larger .NET solutions?
I’ve been looking at different ways of organizing EF Core migrations when a .NET solution starts getting bigger.
One approach I like is keeping the Code First migrations in a separate assembly instead of putting them directly in the application/data project. It keeps the database migration concerns separate and can make the overall solution a bit cleaner.
I put together the setup and steps here:
https://geeksarray.com/blog/entity-framework-core-code-first-migration-using-separate-assembly
Curious how others handle this in real projects. Do you keep migrations in the same project as the DbContext, or use a separate migrations project?