Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Commented Issue: Interaction between "DropCreateDatabase..." initializers and Automatic migrations could be better [1192]

$
0
0
It would be a better user experience if when automatic migrations are enabled and a DropCreate initializer is present on the same context the initializer is either ignored or is applied.

In the current scenario we drop the database, but then don't recreate it leading to a "the provider failed to open" exception.
Comments: @getfuzzy Probably the best solution for you is to either use the MigrateDatabaseToLatestVersion initializer directly, or create a new initializer to based on it that always deletes the database and then uses Migrations to initialize it.

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>