Entity Framework Code First---EF Power Tool working with MySQL problems encountered

Source: Internet
Author: User

For an introduction to how to use the EF Power tool, see http://www.cnblogs.com/LingzhiSun/archive/2011/05/24/EFPowerTool_1.html, which is no longer verbose.

MySQL has a default sample database in the world, with three tables in it,

Download the entity Framework Power Tools installation package, which is now the BETA3 version, http://visualstudiogallery.msdn.microsoft.com/ 72a60b14-1581-4b9b-89f2-846072eff19d/

After downloading the installation, then create a new console project with the project name Efentity, then right-click on the project name and select entity framework– in the pop-up menu Reverse Engineering code First.

Select the appropriate database connection

You can see that the referenced assembly is not referenced

App. Config also has one more providers child node

  <entityFramework>
    <defaultconnectionfactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework ">
      <parameters>
        value="v11.0"/>
      </parameters>
    </defaultConnectionFactory>
    Remove this child node
      <provider invariantname="System.Data.SqlClient" type=" System.Data.Entity.SqlServer.SqlProviderServices, Entityframework.sqlserver "/> 
    </providers>
  </entityFramework>

The providers sub-node needs to be deleted, referring to the MySQL connector driver

To run the program properly.

Entity Framework Code First---EF Power Tool working with MySQL problems encountered

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.