【问题标题】:Generating code from an existing database EF7从现有数据库 EF7 生成代码
【发布时间】:2015-12-20 20:37:24
【问题描述】:

我正在尝试从我的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 生成代码

我正在使用这个命令:

dnx ef dbcontext scaffold "ConnectionString" EntityFramework.SqlServer

谢谢。

【问题讨论】:

    标签: asp.net database asp.net-core entity-framework-core


    【解决方案1】:

    升级所有包以保持一致。你有 beta5 和 beta 8 混合。如果您仍然遇到错误,请检查或归档并发布到相应的存储库。 https://github.com/aspnet

    【讨论】:

      猜你喜欢
      • 2010-10-25
      • 2011-12-25
      • 1970-01-01
      • 2013-08-22
      • 2013-12-29
      • 1970-01-01
      • 1970-01-01
      • 2014-06-18
      • 1970-01-01
      相关资源
      最近更新 更多