简体   繁体   English

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

[英]ADO.NET Entity Data Model first - generate DB Firebird .NET provider

I have a problem with creating a Firebird DB from Entity Data Model (Model first, Database first all same mistake). 我从实体数据模型创建Firebird数据库时遇到问题(首先是模型,首先是数据库,都是同样的错误)。

Setup: 设定:

  • MS Visual Studio 2013 Pro MS Visual Studio 2013专业版
  • Entity Framework 6.0.2 实体框架6.0.2
  • FirebirdClient 4.1.0.0 FirebirdClient 4.1.0.0
  • .NET4.5 .NET4.5

I've created a Data connection to empty Firebird DB (all works fine). 我已经创建了到空Firebird DB的数据连接(一切正常)。 I created a blank ADO.NET Entity Data Model, created the model (3 tables with associations) and I want to create the Firebird DB from the model and it throws provider unsupported: 我创建了一个空白的ADO.NET实体数据模型,创建了该模型(具有关联的3个表),并且我想从该模型创建Firebird DB,并且它抛出了不受支持的提供程序:

Your project references the latest version of Entity Framework; 您的项目引用了Entity Framework的最新版本; however, an EF database provider compatible with version could not be found for your data connection... 但是,找不到与版本兼容的EF数据库提供程序用于您的数据连接...

But I think, I use the correct one. 但我认为,我使用的是正确的。

App.config code: 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>

Any idea what's wrong? 知道有什么问题吗?

Did you install the EF6 provider form Nuget: 您是否安装了EF6提供程序表格Nuget:

install-package FirebirdSql.Data.FirebirdClient-EF6

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM