Aleksandar
Aleksandar

Reputation: 266

Firebird .NET Provider 5.0.0 and EF6

I have been trying to create Entity Data Model of Firebird database, but i can't get past this error:

this error.

I have installed:

Here is my 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>

and here is my 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>

Here is my connection string:

metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=FirebirdSql.Data.FirebirdClient;provider connection string=&quot;character set=NONE;initial catalog=C:\Users\brakm\Desktop\test.fdb;user id=sysdba;password=masterkey;data source=localhost&quot;

More info:

EDIT

I've tried creating model in new(clean) project (C# Console application) and it worked. i installed EntityFramework.Firebird(from NuGet) and it automatically installed base EF and Firebird sql provider, but after doing the same with original project nothing changed, i tried cleaning project from anything related with firebird including removing references, clearing packages.config and manually deleting any firebird related file from project.

Upvotes: 2

Views: 1713

Answers (1)

Aleksandar
Aleksandar

Reputation: 266

Managed to fix it,

  • Remove all Entity framework and Firebird references from project
  • Clear packages.config file
  • Delete all files that are linked to EF and Firebird from project directory
  • Download EntityFramework.Firebird from NuGet (this will automatically install FirebirdClient and EntityFramework oldest compatible version by default)
  • Update EF to latest versions since base 6.0 caused crashes for unknown(to me) reason

Upvotes: 5

Related Questions