從現有數據庫EF7生成代碼

asp.net asp.net-core database entity-framework-core

我正在嘗試從我的database generate code ,但我得到errorsSystem.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生成代碼

我正在使用此命令:

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

謝謝。

一般承認的答案

升級所有包以保持一致。你有beta5和beta 8混合。如果您仍然遇到錯誤,請檢查或提交並發送到相應的存儲庫。 https://github.com/aspnet




許可下: CC-BY-SA with attribution
不隸屬於 Stack Overflow
這個KB合法嗎? 是的,了解原因
許可下: CC-BY-SA with attribution
不隸屬於 Stack Overflow
這個KB合法嗎? 是的,了解原因