我正在尝试generate code
database
,但我得到errors
:System.AggregateException: One or more errors occurred
。 --->找不到方法
这是我的project.json:
{
"webroot": "wwwroot",
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNet.Mvc": "6.0.0-beta5",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta7",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta5",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta5",
"EntityFramework.SqlServer": "7.0.0-beta8-15797",
"EntityFramework.Commands": "7.0.0-beta8-15797",
"EntityFramework.SqlServer.Design": "7.0.0-beta8-15797",
"Remotion.Linq": "2.0.0-rc-001"
},
"commands": {
"web": "Microsoft.AspNet.Hosting --config hosting.ini",
"ef": "EntityFramework.Commands"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"publishExclude": [
"node_modules",
"bower_components",
"**.xproj",
"**.user",
"**.vspscc"
]
}
如何从现有数据库EF7生成代码
我正在使用此命令:
dnx ef dbcontext scaffold "ConnectionString" EntityFramework.SqlServer
谢谢。
答案 0 :(得分:0)
升级所有包以保持一致。你有beta5和beta 8混合。如果您仍然遇到错误,请检查或提交并发送到相应的存储库。 https://github.com/aspnet