我一直在尝试创建Firebird数据库的实体数据模型,但我无法通过此错误:
我已安装:
DDEX提供商3.0.2.0
Firebird .NET Provider 5.0.0.0(尝试将其与Firebird的官方网站上的.msi一起安装并手动添加参考 项目并从NuGet安装
EntityFramework.Firebird(来自NuGet)
这是我的machine.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, Version=5.0.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c"/>
</DbProviderFactories>
</system.data>
这是我的App.config:
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<system.data>
<DbProviderFactories>
<remove invariant="FirebirdSql.Data.FirebirdClient" />
<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>
</system.data>
<entityFramework>
<providers>
<provider invariantName="FirebirdSql.Data.FirebirdClient" type="FirebirdSql.Data.EntityFramework6.FbProviderServices, EntityFramework.Firebird" />
</providers>
<defaultConnectionFactory type="FirebirdSql.Data.EntityFramework6.FbConnectionFactory, EntityFramework.Firebird" />
</entityFramework>
这是我的连接字符串:
metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=FirebirdSql.Data.FirebirdClient;provider connection string="character set=NONE;initial catalog=C:\Users\brakm\Desktop\test.fdb;user id=sysdba;password=masterkey;data source=localhost"
更多信息:
修改
我尝试在新的(干净的)项目(C#控制台应用程序)中创建模型并且它有效。我安装了EntityFramework.Firebird(来自NuGet)并且它自动安装了基本EF和Firebird sql提供程序,但是在对原始项目执行相同操作之后没有任何改变,我尝试从与firebird相关的任何事情清理项目,包括删除引用,清除packages.config和手动从项目中删除任何与firebird相关的文件。
答案 0 :(得分:4)
管理修复它,