我正在尝试在 VS 中将 EntityFramework 与 mvc 3 一起使用。我已经在引用下安装了 EntityFramework,但是当我尝试在线使用该框架时
using System.Data.Entity.ModelConfiguration.Conventions.Edm.db;
我在 .edm 下收到一个红色错误,提示
The namespace or name 'Edm' does not exist in the namespace 'System.Data.Entity.ModelConfiguration.Conventions' (are you missing an assembly reference?)
原本我以为我有一个旧版本的 EntityFramework,所以我卸载了该软件包并重新安装了最新版本,但我仍然收到相同的错误。
我还需要安装其他软件包吗?
最佳答案
您可能会发现这个新的 MVC 3/EF 教程系列很有帮助: http://www.asp.net/entity-framework/tutorials/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application 它基于 Code First 和 MVC 3 的最新工具更新。
关于c# - 使用MVC, Entity Framework 找不到程序集引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5748615/