简体   繁体   中英

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).

Setup:

  • MS Visual Studio 2013 Pro
  • Entity Framework 6.0.2
  • FirebirdClient 4.1.0.0
  • .NET4.5

I've created a Data connection to empty Firebird DB (all works fine). 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:

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...

But I think, I use the correct one.

App.config code:

<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:

install-package FirebirdSql.Data.FirebirdClient-EF6

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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