小编Mic*_*ael的帖子

单实体框架6 MySQL

我开发了一个使用实体框架6的项目,它使用MySQLas数据库..在我的Windows系统上,该项目正在运行.现在我试图在我的linux机器上移动该项目.为了运行项目,我将MySQLdll 添加到GAC和机器配置.所有需要的dll也位于项目文件夹中.当实体框架访问数据库时,我收到以下错误:

System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.
  at System.Data.Common.DbProviderFactories.GetFactory (System.Data.DataRow providerRow) [0x00000] in <filename unknown>:0

<?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" />
  </startup>
  <connectionStrings>
    <add name="CashDeskServerContext" providerName="MySql.Data.MySqlClient" connectionString="server=localhost;
      port=3306;database=ServerContext;uid=root;password=password;Convert Zero Datetime=True"/>
      <add name="AuditLogContext" providerName="MySql.Data.MySqlClient" connectionString="server=localhost;
      port=3306;database=AuditLogContext;uid=root;password=password;Convert Zero Datetime=True"/>
  </connectionStrings>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers> …
Run Code Online (Sandbox Code Playgroud)

.net c# mysql mono entity-framework

8
推荐指数
1
解决办法
1万
查看次数

单一实体框架6重复

我在我的Windows计算机上使用了Entity Framework 6,它工作正常.为了在Linux计算机上使用,我尝试使用Mono运行项目.当程序试图访问EF6时,我收到以下错误:

System.InvalidOperationException: The configured column orders for the table 'Table' contains duplicates. Ensure the specified column order values are distinct.
  at System.Data.Entity.ModelConfiguration.Conventions.ColumnOrderingConventionStrict.ValidateColumns (System.Data.Entity.Core.Metadata.Edm.EntityType table, System.String tableName) [0x00000] in <filename unknown>:0
  at System.Data.Entity.ModelConfiguration.Conventions.ColumnOrderingConvention.Apply (System.Data.Entity.Core.Metadata.Edm.EntityType item, System.Data.Entity.Infrastructure.DbModel model) [0x00000] in <filename unknown>:0
Run Code Online (Sandbox Code Playgroud)

c# mono entity-framework

5
推荐指数
1
解决办法
1556
查看次数

标签 统计

c# ×2

entity-framework ×2

mono ×2

.net ×1

mysql ×1