Tuesday, 6 August 2013

Entity Framework DropCreateDatabaseAlways + MigrateDatabaseToLatestVersion

Entity Framework DropCreateDatabaseAlways + MigrateDatabaseToLatestVersion

I'm writing some integration tests that hit the database and I'm using
Entity Framework 5 Code First Migrations
My tests work great when I'm using DropCreateDatabaseAlways. This
initializes the database based on the Entity Framework context but the
problem is that my migrations are not running and I have some migrations
with custom SQL statements like creating indexes for example.
What I would like to have is a combination of
DropCreateDatabaseAlways and MigrateDatabaseToLatestVersion
Any ideas?

No comments:

Post a Comment