关于实体框架:Firebird .NET Provider 5.0.0 和 EF6 | 珊瑚贝

Firebird .NET Provider 5.0.0 and EF6


我一直在尝试创建 Firebird 数据库的实体数据模型,但我无法通过此错误:

this

我已经安装了:

  • DDEX 提供者 3.0.2.0

  • Firebird .NET Provider 5.0.0.0(尝试使用 Firebird 官方网站上的 .msi 安装它并手动添加参考
    项目并从 NuGet 安装)

  • EntityFramework.Firebird(来自 NuGet)

这是我的 machine.config:

1
2
3
4
5
    <system.data>
         <DbProviderFactories>
           
         </DbProviderFactories>
    </system.data>

这是我的 App.config:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 <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” />
         
     </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>

这是我的连接字符串:

1
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”

更多信息:

  • 视觉工作室 2015
  • 火鸟版本是 2.5
  • 尝试使用 EF 6.0 和 EF 6.13

编辑

我尝试在新的(干净的)项目(C# 控制台应用程序)中创建模型,并且成功了。我安装了EntityFramework.Firebird(来自NuGet)并自动安装了基础EF和Firebird sql提供程序,但是在对原始项目执行相同操作后没有任何改变,我尝试从与firebird相关的任何内容中清理项目,包括删除引用、清除packages.config和手动从项目中删除任何与 firebird 相关的文件。

  • 还发布您的连接字符串
  • 在连接字符串中编辑
  • 在 VS 中,单击服务器管理器并尝试创建与 FB 数据库的连接。我认为这失败了,您在这里看不到 FB。正确的?更新 VSIX 扩展后,DDEX 提供程序将丢失 (tracker.firebirdsql.org/browse/DNET-581)。修复 DDEX,然后重试。
  • 好吧,我添加 fb 连接没有任何问题,我可以看到它没有任何问题。


设法修复它,

  • 从项目中删除所有实体框架和 Firebird 引用
  • 清除 packages.config 文件
  • 从项目目录中删除所有链接到 EF 和 Firebird 的文件
  • 从 NuGet 下载 EntityFramework.Firebird(这将默认自动安装 FirebirdClient 和 EntityFramework 最旧的兼容版本)
  • 将 EF 更新到自 base 6.0 以来的最新版本导致(对我而言)未知原因的崩溃
  • 很高兴听到你修好了:) 1
  • 这也适用于我,还有一个更新版本的 FBCLient 显示在升级选项卡中,但我没有升级那块。


来源:https://www.codenong.com/37308944/

微信公众号
手机浏览(小程序)
0
分享到:
没有账号? 忘记密码?