EF move migration to new project

c# ef-migrations entity-framework entity-framework-6

Question

I want to transfer all the EF entities and the code-first migrations to a new project as I restructure a project. I changed the namespace of the ContextKey in the _Migrations table. No new modifications are found after executing an Add-Migration (Up() and Down() are empty). But the database is not generated again when I remove the localdb (it did before the move). Only migrations created after the move appear to be executed (but this shouldn't be the case).

How can I ensure that while building a new database all migrations, including those prior to the move, are executed?

--edit--

No problem: (

I moved the current migrations by dragging and dropping them into the new project, renamed the namespaces in the migration.cs files, but I didn't remember the migration's underlying code. Designer.cs

1
2
4/29/2016 6:32:41 PM

Popular Answer

ZZZ_tmp
3
4/11/2017 3:27:36 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow