【发布时间】:2012-08-28 18:19:47
【问题描述】:
我正在使用 RTM 版本的 Windows 8 和 VS 2012 Ultimate。我有一个使用 SqlCe 4.0 和代码优先实体框架模型的 MVC4 项目。
模型很简单:
public class MyThing
{
public int MyThingId { get; set; }
public int UserId { get; set; }
public string Title { get; set; }
public string Address { get; set; }
public string Description { get; set; }
public DateTime Date { get; set; }
}
当我尝试使用内置脚手架创建新控制器时,我收到以下错误:
“无法检索 MyThing 的元数据”
"使用相同的 DbCompiledModel 创建针对不同的上下文 不支持类型的数据库服务器。相反,创建一个 为正在使用的每种类型的服务器提供单独的 DbCompiledModel。
如何让脚手架工作?
【问题讨论】:
-
有一个特定的解决方案 - Suplanus 如果你来到这里是因为 MySql 而不是 SqlCe
标签: asp.net-mvc asp.net-mvc-4 visual-studio-2012 scaffolding