首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Database-first EF7-7.0.0-rc1-final dnx ef dbcontext scaffold命令失败

Database-first EF7-7.0.0-rc1-final dnx ef dbcontext scaffold命令失败
EN

Stack Overflow用户
提问于 2016-01-06 00:46:44
回答 1查看 464关注 0票数 1

我使用这个命令:

代码语言:javascript
复制
dnx ef dbcontext scaffold "Server=webuat08,1433,Database=Store;user    
id=user_here;password=password_here" EntityFramework.MicrosoftSqlServer

数据库"Store“存在。但是我得到了以下错误:

代码语言:javascript
复制
Unable to identify the primary key for table 'dbo.spt_fallback_db'.
Unable to generate entity type for table 'dbo.spt_fallback_db'.
Unable to identify the primary key for table 'dbo.spt_fallback_dev'.
Unable to generate entity type for table 'dbo.spt_fallback_dev'.
Unable to identify the primary key for table 'dbo.spt_fallback_usg'.
Unable to generate entity type for table 'dbo.spt_fallback_usg'.
Could not find type mapping for column 
'dbo.MSreplication_options.optname'     with data type 'sysname'. Skipping column.
Unable to identify the primary key for table 'dbo.MSreplication_options'.
Unable to generate entity type for table 'dbo.MSreplication_options'.
Unable to identify the primary key for table 'dbo.spt_monitor'.
Unable to generate entity type for table 'dbo.spt_monitor'.
Done

如果我在命令中将数据库的名称更改为一个不存在的DB,我仍然会得到相同的错误。有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2016-09-15 07:56:23

您需要将主键放入表中

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34616902

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档