我在我的项目中使用 Entity Framework 5。我想测试一些新的功能。
发生的事情是,即使我的数据库已更新,(当我添加迁移时,它不会添加任何其他内容)并且即使我运行我的项目,它也运行得很好。当我尝试使用 NUNIT 测试项目时,我得到了这个异常:
System.InvalidOperationException : The model backing the 'DbContext' context has changed since the database was created. Consider using Code First Migrations to update the database
你们有人有这个问题吗?如果是这样,我该如何解决?