Generating code from an existing database EF7

a 夏天 提交于 2020-01-06 15:49:11

问题


I'm trying to generate code from my database but i get errors : System.AggregateException: One or more errors occurred. ---> Method not found

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"
]
}

How do i Generating code from an existing database EF7

I'm using this command :

dnx ef dbcontext scaffold "ConnectionString" EntityFramework.SqlServer

Thank you.


回答1:


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



来源:https://stackoverflow.com/questions/32741066/generating-code-from-an-existing-database-ef7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!