数据库优先EF7-beta7 dnx ef dbcontext scaffold命令失败

时间:2015-09-03 14:02:43

标签: sql-server asp.net-core dnx entity-framework-core

在asp.net 5 beta 7项目中,无论命令是如何编写的,我都会得到一个无法识别的参数,试图从现有数据库中构建dbcontext:

C:\Dev\Project>dnx ef dbcontext scaffold provider EntityFramework.SqlServer connection 
    "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=ubercrew_relation;Integrated Security=True"

我已经尝试了两个参数connection和provider

的所有可能组合

您是否知道执行scaffold命令的正确语法?

1 个答案:

答案 0 :(得分:10)

正确的命令是:

  

C:\ Dev \ Project> dnx ef dbcontext scaffold" Data Source =(localdb)\ MSSQLLocalDB; Initial Catalog = ubercrew_relation; Integrated Security = True" EntityFramework.SqlServer

请务必通过nuGet

安装EntityFramework.SqlServer.Design软件包