zoukankan      html  css  js  c++  java
  • VS 2013 EF6

    维护一个老项目,需要添加数据库,添加得了EF6引用后,Install-Package EntityFramework -Version 6.1.1,项目右键添加ADO.Net Entity Data Model,出现如下问题:Your project references the latest version of Entity Framework; however, an Entity Framework database provider compatibale with this version could not be found for your data connectino.

    就是找不到合适的data connetor,需要手动添加:添加引用 MySQL.Data,MySQL.Data.Entity.EF6

    修改Config

    <entityFramework>   
        <defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
        <providers>
          <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
          <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
        </providers>
      </entityFramework>

    重新编译项目,然后再添加就可以了

  • 相关阅读:
    [摘]MongoDB范围查询的索引优化
    python ftp 暴破
    写mongodb日志
    [转]使用 Python 实现跨平台的安装程序
    HDOJ 1008 Elevator
    第一个数字
    反转串
    HDOJ 1108 最小公倍数
    HDOJ 1096 A+B for InputOutput Practice (VIII)
    报数游戏
  • 原文地址:https://www.cnblogs.com/LLLLoveLLLLife/p/7825272.html
Copyright © 2011-2022 走看看