I use EF CodeFirst and would like to recreate tables in database using command line from package manager console, how to do that?
The problem is that while developing a EF CodeFirst models changes often and I delete tables in database manually and then EF recreate them on first run. To delete tables manually takes time and I think it should be a command which recreate tables from scratch in EF.
You can use Update-Database -Target 0
to revert your database to it's initial state and then Update-Database
to update your database to the latest version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With