I am getting blank list when i trying to add database with entity framework. Note: i am using code first approach. Please check the screen shot bellow for better understanding. Its existing project just deleted .edmx and now trying to generating again for a issue.
Asked
Active
Viewed 30 times
1 Answers
0
I would try to delete the migrations folders and start over. I've run into this problem before and had to delete the ef migrations and start over.
1) Manually delete your DB - wherever it is (I'm assuming you have your connection sorted), or empty it, but easier/safer is to delete it all together - as there is system __MigrationHistory table - you need that removed too.
2) Remove all migration files - which are under Migrations - and named like numbers etc. - remove them all,
3) Rebuild your project containing migrations (and the rest) - and make sure your project is set up (configuration) to build automatically (that sometimes may cause problems - but not likely for you),
4) Run Add-Migration Initial again - then Update-Database

dev8989
- 339
- 1
- 3
- 15