解决办法:
1. 运行services.msc,重启MySQL服务.
2. 在MySQL运行一下命令: use mydbname; set global optimizer_switch='derived_merge=OFF';
3. 重新生成 .edmx