In this there is not much to say entityframework compared to the various advantages and disadvantages of ADO. Please forgive me for not writing well.
Recently used entityframework6.0 connection MySQL, encountered a variety of problems, Baidu Google on many posts but can not solve the situation. So send a post to provide a complete and workable solution.
One, Mysqldatabase appears in the Entity Data Model Creation Wizard:
1: Install MySQL for Visual Studio 1.1.1 (with the above version)
2: Install MySQL Connector Net 6.8.3 (with the above version)
3: Install the NuGet Package Manager and download it in the expand function of vs.
PS: When installing MySQL, some users will automatically install the latest version of the above two software if they choose a full installation.
After restarting vs:
At this point, the Entity Framework 6.x still cannot check the next step.
II: Project Environment configuration
1: In the menu bar tool->nuget Package Manager, in the Package Manager console, enter the following commands sequentially:
Install-package entityframework-version 6.0.0
Install-package entityframework.zh-hans-version 6.0.0
Install-package MySql.Data.Entities.EF6
The files required for the first execution of the download are slow.
After execution, add the <entityFramework> <providers> under Config file.
<provider invariantname= "MySql.Data.MySqlClient" type= "MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6 "/>
To this end, you can happily use ef6.x, hey, next post see, (reprint please indicate the source).
How to use entityframework6.x to connect to MySQL in VS2013 or earlier versions