c# - 首先是 ADO.NET 实体数据模型 - 生成 DB Firebird .NET 提供程序

标签 c# entity-framework firebird ado.net-entity-data-model embedded-database

我在从实体数据模型创建 Firebird 数据库时遇到问题(模型优先,数据库优先都是同样的错误)。

设置:

  • MS Visual Studio 2013 专业版
  • Entity Framework 6.0.2
  • Firebird 客户端 4.1.0.0
  • .NET4.5

我已经创建了一个到空 Firebird 数据库的数据连接(一切正常)。 我创建了一个空白的 ADO.NET 实体数据模型,创建了模型(3 个具有关联的表),我想从该模型创建 Firebird 数据库,它抛出提供程序不受支持:

Your project references the latest version of Entity Framework; however, an EF database provider compatible with version could not be found for your data connection...

但我认为,我使用的是正确的。

App.config 代码:

<system.data>
<DbProviderFactories>
  <add name="FirebirdClient Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".NET Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient"/>
</DbProviderFactories>

<providers>
  <provider invariantName="FirebirdSql.Data.FirebirdClient" type="FirebirdSql.Data.FirebirdClient.FbProviderServices, FirebirdSql.Data.FirebirdClient"/>
  <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>

知道哪里出了问题吗?

最佳答案

您是否安装了 Nuget 形式的 EF6 提供程序:

install-package FirebirdSql.Data.FirebirdClient-EF6

参见 http://blog.cincura.net/233426-entity-framework-6-with-firebird/

关于c# - 首先是 ADO.NET 实体数据模型 - 生成 DB Firebird .NET 提供程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22195490/

相关文章:

c# - Icecast 2 : protocol description, 使用 C# 流式传输到它

entity-framework - 无法在 Entity Framework 中生成显式迁移

entity-framework - Entity Framework 在datareader关闭时调用 'Read'

c# - 使用 HttpTrigger 属性在 Azure 函数中自定义路由

c# - 将字符串转换为匿名方法

C#命名空间命名约定

c# - 如何正确设置模型、POCO 类?

date - 如何从 Firebird SQL 中的日期获取季度

delphi - 服务无法访问文件夹

delphi - 从 Delphi 执行脚本时出现错误 "invalid transaction handle (expecting explicit transaction start)"