Interbase .NET entity framework provider
I'd like to use the entity framework for my next project and i'm having some issues finding a .NET interbase driver that su开发者_运维技巧pports the entity framework. I attempted to install the Firebird drivers from http://www.firebirdsql.org/en/net-provider/ but keep running into a vague error when trying to establish a connnection through the Entity Data Model wizard, Error is as follows
"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
If i had to guess, the issue lies with the fact that i'm trying to use an firebird driver to connect to an interbase database.
Any ideas?
You do not specify your Interbase version. Believe me when I say that really matters, because Interbase has been around for a while.
For newer versions, there's already a question here at SO: Best way to connect to Interbase 7.1 using .NET C#.
For older versions, you should consider moving to Firebird. Firebird .NET provider will work well then.
I advise you to use the Firebird .NET driver only for Firebird.
Maybe you can take a look at IBProvider who make oledb driver for Interbase and Firebird.
Just an answer to an old question, but nevertheless noteworthy to mention I believe:
As far as I currently know, there is no support (yet, but it is coming for the near future I believe) for connecting Interbase database with EF. However, it should be possible to write your own provider based upon the guidelines from EF which can be found here. I've come across the exact same issue, which I solved by writing a driver for usage with Interbase XE7 and EF 6 (6.1.2).
To get started, you might want to have a look at the FireBird provider (which is open source) and is already working with EF. If you study the provided code, you might have a good trigger to write your own Interbase provider for EF. The link to FireBirds EF .NET Provider can be found here
As a tip: You need to look at the SQL generator and manifests within the Firebird driver and compare this with the the Interbase SQL grammar. The mappings really differ, but it is just about some small details. When compiling the Firebird driver with the conditional compilation symbols GDS32, the Firebird driver will look and load the gds32.dll provided by Interbase.
精彩评论