I have created migration and created the database and the tables . For example the tables are
A B C D E
. Now again I have changed some part of code and ran update-database
command . Everything went smooth and nice and the tables showed the columns . Now accidentally I manually deleted one two tables D and E
. Now when I try to run the migration with update-database
. It runs properly but doesn't create the tables which I deleted manually . I tried to delete the existing migration and re-run update-database
. It gives the error that apart from the two tables . There already an object existing in 'A ,B, C ' bla bla name.
Any idea how to get rid of this situation without dropping database and recreate the deleted tables using migration ? Cause i dont want to drop the database as it contains the data in rest of the tables. How to proceed in this situation where I have existing tables in database and accidentally I have manually deleted few tables from SQL server from SSMS .
How to recreate the tables again using migration ?
Oh my entity framework version is 6.0.2