【发布时间】:2013-01-14 13:59:00
【问题描述】:
我创建了一个 Code First 类
在Sql中自动创建了一个数据库。
我删除了表格:(
我已启用迁移:
AutomaticMigrationsEnabled = true;
AutomaticMigrationDataLossAllowed = true;
Database.SetInitializer(new DropCreateDatabaseAlways<SurveyContext>());
还有
update-database -force
Cannot find the object "dbo.CustomerResponses" because it does not exist or you do not have permissions.
请帮忙。
【问题讨论】:
-
你的上下文是什么样的?
-
你试过用谷歌搜索
"Cannot find the object because it does not exist or you do not have permissions"吗?
标签: entity-framework code-first