从现有的数据库EF7产生code [英] Generating code from an existing database EF7
本文介绍了从现有的数据库EF7产生code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图生成code
从我数据库
,但我得到错误
: System.AggregateException:出现一个或多个错误
。 --->未找到方法
I'm trying to generate code
from my database
but i get errors
: System.AggregateException: One or more errors occurred
. ---> Method not found
这是我的project.json:
this is my 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"
]
}
如何生成code从现有的数据库EF7
How do i Generating code from an existing database EF7
我使用这个命令:
dnx ef dbcontext scaffold "ConnectionString" EntityFramework.SqlServer
感谢您。
推荐答案
升级所有的包是一致的。你有beta5的和β8混合。如果您仍然遇到错误,请检查或文件及发行到适当的存储库。 https://github.com/aspnet
Upgrade all packages to be consistent. You have beta5 and beta 8 mixed. If you still experience errors, please check or file and issue to the appropriate repository. https://github.com/aspnet
这篇关于从现有的数据库EF7产生code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文