Generating code from an existing database EF7

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

Question

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.

Accepted Answer

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



Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why