EntityFramework 4.3.1 CodeFirst with MySQL (.net connector version<6.5.4)

来源:互联网 发布:漫画控网络错误 编辑:程序博客网 时间:2024/05/30 23:02

CodeFirst 虽然很好,但是为了驯服她,好费劲啊。


MySQL .net connector 版本号 6.5.4 在 EF 4.3.1 中无法顺利执行 Code First 操作。


她会抛出异常,信息如下:

        You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL, 
`ProductVersion` mediumtext NOT NULL);


ALTER TABLE `__MigrationH' at line 6


其实在 EF 4.1的时候是没问题的。

然后有个老兄就跑去SQL论坛问了,如下:

http://forums.mysql.com/read.php?38,519005,519005

国外那些个小牛就回答了:

http://bugs.mysql.com/bug.php?id=64216   真正解决要等到6.5.5

http://forums.mysql.com/read.php?38,519005,525880#msg-525880

而且还有临时的解决方案,直接修改源代码(真不错)


原创粉丝点击