表“TableDetails”中列“IsPrimaryKey”的值为 DBNull。

本文发布于 7 年前,部分内容可能已经失去参考价值。

image.png

更新 .edmx 文件时若提示:

生成模型时出现意外错误。有关详细信息,请参阅输出窗口。异常消息:“StrongTypingException: 表“TableDetails”中列“IsPrimaryKey”的值为 DBNull。”。


可以通过以下方法来解决:

1,控制面板中打开“服务”(或执行命令 services.msc),重新启动“MySQL57”

2,在 MySQL 中执行:

use <<database name>>;
set global optimizer_switch='derived_merge=OFF';

如果提示“1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation”,请使用超级用户进行操作。

3,搞定,试试更新 .edmx 吧。


参考资料:https://stackoverflow.com/questions/33575109/mysql-entity-the-value-for-column-isprimarykey-in-table-tabledetails-is

xoyozo 6 年前
转载请注明出处
云服务器 精选特惠
可能相关的内容