我在从实体数据模型创建 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/