Entity framework migration “Table does not exist”

笑着哭i 提交于 2021-01-27 05:03:30

问题


im new to entity framework , i created my entities from reverse engineering from a Mysql database that i have created in mysqlworkbench , and then i added some foreign keys in my entities and then i added a migration and tried to update my database but an error occured and it indicates that: "Table 'pidev.pidev.personal' doesn't exist". "pidev" is the name of my database. personal is a super class for two other subclasses "candiadte" and "employee" and im using TPH as inheritance strategy. PLZ i need some help.


回答1:


thank you all for your replies , I SOLVED the problem in the UP() and DOWN()method in the migration file i removed the name of the database in each line like this "DropPrimaryKey("pidev.personal");" ==> DropPrimaryKey("personal");



来源:https://stackoverflow.com/questions/33894833/entity-framework-migration-table-does-not-exist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!