2

我正在使用带有 DB 优先方法的实体框架。我已成功从 EF5 迁移到 EF6。在 EF5 中,我使用预生成的视图来提高启动性能。在 EF6 中,它不起作用。我使用电动工具生成了视图。电动工具成功生成它,我可以毫无错误地构建应用程序。

但是当我运行它时,出现以下错误:

The current model no longer matches the model used to pre-generate the mapping views, as indicated by the ViewsForBaseEntitySetsfc4437b421d2fd7f4d645bf31e3cb5b1b8374d9c77a07ef5f36c1cac0bfea31a.MappingHashValue property. 
Pre-generated mapping views must be either regenerated using the current model or removed if mapping views generated at runtime should be used instead

我无法理解为什么通过电动工具生成的哈希值与 EF 在运行时生成的哈希值之间存在差异。edmx 文件没有变化。

edmx 中有 290 多个实体。

6.1.3 中的实体框架版本。
电动工具是VSPowerTools-Beta4。
我正在使用 Visual Studio 2013。
edmx 的代码生成开始是“Legacy ObjectContext”。

4

0 回答 0