I’m using EF Code First 4.3 Migrations to update my database scheme. Now I have the following situation: table A needs to be removed, table B must be created and the data of table A must be copied (along with some other data) to table B. I do not have access to the DbContext in the DbMigration class, my question is how to implement this?
I’m using EF Code First 4.3 Migrations to update my database scheme. Now I
Share
In migration
Upmethod of your migration you can useSqlmethod to define any SQL you need so if you use explicit migration you can put data migration code between creating Table B and removing Table A.