• Entity Framework 使用Mysql的配置文件


    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <configSections>
        <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
      </configSections>
      <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
      </startup>
      <system.data>
        <DbProviderFactories>
          <remove invariant="MySql.Data.MySqlClient" />
          <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
        </DbProviderFactories>
      </system.data>
      <entityFramework codeConfigurationType="MySql.Data.Entity.MySqlEFConfiguration, MySql.Data.Entity.EF6">
        <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
          <parameters>
            <parameter value="v11.0" />
          </parameters>
        </defaultConnectionFactory>
        <providers>
          <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
          <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
        </providers>
      </entityFramework>
      <connectionStrings>
        <add name="www" connectionString="Data Source=localhost;Initial Catalog=nima;user id=root;password=123456;" providerName="MySql.Data.MySqlClient" />
      </connectionStrings>
    </configuration>
  • 相关阅读:
    [Android]SharedPreferences
    [Android]XML界面布局常用属性概括
    [Android]XML解析技术
    [Android]Layout标签之-viewStub,requestFocus,merge,include
    [Android]JSON
    [Android]SQLite基本控制台命令简介
    [Android]流文件
    [HTML5]WebSQLDatabase-关系型数据库简介
    [Android]ADB和NavicatLiteSQLDBmanager的数据管理
    [Android]SqliteOpenHelper抽象类实现SQL_DB的管理
  • 原文地址:https://www.cnblogs.com/luoshupeng/p/4089688.html
Copyright © 2020-2023  润新知