mysql+EFCodeFirst

来源:互联网 发布:昆山软件行业协会 编辑:程序博客网 时间:2024/06/05 18:07

问题总结:

1.需要安装的软件:

 (1)mysql数据库

 (2)mysql connector net

 (3)EFPowerTools.vsix

 (4)mysql-for-visualstudio-1.2.3.msi

2.扩展

(1)使用udl测试mysql数据库需要使用mysql-connector-odbc-5.1.6-win32.msi驱动。在odbc源中添加mysql数据源。

3.主要事项

(1)出现下面错误,解决方法为:persistsecurityinfo=True;

         System.Data.ProviderIncompatibleException: The provider did not return a ProviderManifestToken string. ---> MySql.Data.MySqlClient.MySqlException: Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'localhost' (using password: NO) ---> MySql.Data.MySqlClient.MySqlException: Access denied for user 'root'@'localhost' (using password: NO)

(2)出现下面错误,解决方法为:添加System.Data.Entity程序集

Error1The type 'System.Data.Objects.ObjectContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

0 0
原创粉丝点击