Thanks to magicandre1981 comment, I tried using NuGet instead of simply downloading the dlls from firebird's website.
I usually avoid NuGet automatic installation packages but it helped me got further so I decided to give it a try anyway : the error message I had was no longer showing up during initialization of the entity framework context.
I had a warning though during compilation about two assemblies sharing a dependence but a different version number and you guess right... Visual Studio wasn't nice enough to tell what were those assemblies. I just ignored it for the time being and ran my program to get a System.Data.ProviderIncompatibleException. Not that surprising with the Visual Studio warning I just ignored.
So back to the warning and thanks to AsmSpy.exe from github (https://github.com/mikehadlow/AsmSpy), I found that:
Reference: FirebirdSql.Data.FirebirdClient
4.7.0.0 by EntityFramework.Firebird
4.5.0.0 by FirebirdTest
FirebirdTest is the name of my csproj which sole purpose is to test firebird with entity framework. The solution has nothing else but this project. The FirebirdSql.Data.FirebirdClient got installed because I installed it using NuGet following command:
Install-Package EntityFramework.Firebird
That basically means that the NuGet package did installed the wrong Firebird.Data.FirebirdClient assembly version. So I did the following
- Edited the NuGet packages.config file so the correct vresion of Firebird.Data.FirebirdClient assembly version would be downloaded
- Deleted the old version package of the Firebird.Data.FirebirdClient
- Forced a restore of my NuGet packages, this time the correct version was downloaded.
And finally edited the app.config in my project so the bindingRedirect will use 4.7.0.0 instead of 4.5.0.0. This is found within section configuration/runtime/assemblyBinding/dependentAssembly section of the app.config file.
<bindingRedirect oldVersion="0.0.0.0-4.7.0.0" newVersion="4.7.0.0" />
So basically, the NuGet package is wrong and do not install the correct version of Firebird.Data.FirebirdClient assembly. Maybe I'm unlucky but that's usually why I'm not a fan of NuGet even if I know it's not the NuGet itself the problem.
Anyhow, as you can see, it's not easy to make Firebird work with entity framework (and I won't tell you about the hell I'm going through right now with the Firebird DDEX package). While firebird database seems in itself very promising for an embedded database technology. The lack of proper documentation to integrate it with entity framework sadly make things a lot harder than it should.