【问题标题】:Entity Data Model doesn´t show MySql option实体数据模型不显示 MySql 选项
【发布时间】:2016-04-18 17:13:54
【问题描述】:

我正在使用 xampp xampp-win32-5.6.15-1-VC11-installer.exe 和 MySQL Connector Net 6.6.4

我将以下文件添加到我的 MVC 项目中

  • MySql.Data
  • MySql.Data.Entity
  • MySql.Web

我的 web.config

 <?xml version="1.0" encoding="utf-8"?>
<!--
  Para obtener más información sobre cómo configurar la aplicación de ASP.NET, visite
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

    <configuration>
      <appSettings>
        <add key="webpages:Version" value="2.0.0.0" />
        <add key="webpages:Enabled" value="false" />
        <add key="PreserveLoginUrl" value="true" />
        <add key="ClientValidationEnabled" value="true" />
        <add key="UnobtrusiveJavaScriptEnabled" value="true" />
      </appSettings>

      <system.web>

        <httpRuntime targetFramework="4.5" />

        <compilation debug="true" targetFramework="4.5" />

        <pages>
          <namespaces>
            <add namespace="System.Web.Helpers" />
            <add namespace="System.Web.Mvc" />
            <add namespace="System.Web.Mvc.Ajax" />
            <add namespace="System.Web.Mvc.Html" />
            <add namespace="System.Web.Routing" />
            <add namespace="System.Web.WebPages" />
          </namespaces>
        </pages>
      </system.web>

      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />

      <handlers>
          <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
          <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
          <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
          <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
          <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
          <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
        </handlers></system.webServer>
    </configuration>

当我尝试添加实体数据模型时,MySql 选项不存在。

【问题讨论】:

    标签: c# mysql entity-framework model-view-controller


    【解决方案1】:

    您需要 mySQL 数据连接器和 MySQL for Visual Studio。

    http://dev.mysql.com/doc/connector-net/en/connector-net-visual-studio-install.html

    请务必遵循有关安装顺序的说明。我过去也遇到过这个问题。

    【讨论】:

    • 我卸载了旧的 MySQL Connector Net 6.6.4,然后我安装了新版本 6.8.7,但错误仍然存​​在,我正在使用 Visual Studio 2013
    • 我尝试将此行添加到我的 web.config 到:跨度>
    • 连接器应该与 2013 兼容。看看这里:dev.mysql.com/doc/connector-net/en/…
    • 我现在使用的连接器是 Visual Studio 2013 支持的 6.8,我尝试与您传递给我的最后一个链接相同,但错误仍在继续,新的连接数据库没有t 显示 mysql 选项。
    • MySQL for Visual Studio 在服务器资源管理器中启用了 mysqldatabase 选项,而 mySQL 数据连接器在实体数据模型向导下启用了相同的选项。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-06-14
    • 2023-03-29
    • 2012-10-28
    • 1970-01-01
    • 2014-02-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多