开发者

Firebird's Entity Model support

开发者 https://www.devze.com 2023-04-10 23:54 出处:网络
I downloaded Firebird 2.5 and read somewhere that it supports Entity Framework. When I add ADO.NET Entity Data Model in my project and try to update database with model, Visual Studio 2010 only displa

I downloaded Firebird 2.5 and read somewhere that it supports Entity Framework. When I add ADO.NET Entity Data Model in my project and try to update database with model, Visual Studio 2010 only displays SQL Server data sources in the list. There is no ODBC or Firebird.NET provider listed.

In that case, how to make Firebird to act as a data source for the Entity Model in my proje开发者_Go百科ct?


Install Firebird-2.5.0.26074_1_Win32.

Install NETProvider-2.6.0.

And to integrate it in VS2010:

Extract FirebirdDDEXProvider-2.0.5.zip and follow instructions in ReadMe.txt inside.

(the combination of these versions is working - I haven't tried the newer versions)

Update: A little more details on how I did some of the steps in ReadMe.txt

In Step-1: Register these 2 files in GAC

cd "C:\Program Files\FirebirdDDEXProvider-2.0.5"
"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\gacutil.exe" /i FirebirdSql.VisualStudio.DataTools.dll

cd "C:\Program Files\FirebirdClient"
"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\gacutil.exe" /i FirebirdSql.Data.FirebirdClient.dll

In Step-2: Here is the part I added to machine.config

<configuration>
  <configSections>
    ...
    <section name="firebirdsql.data.firebirdclient"
         type="System.Data.Common.DbProviderConfigurationHandler, System.Data, 
         Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

and

<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=2.6.0.0, Culture=neutral, 
    PublicKeyToken=3750abcc3150b00c" />

Replace "3750abcc3150b00c" in the above with the key from this:

"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\gacutil.exe" /l Firebirdsql.data.firebirdclient


i did the same, in server explorer Firebird's provider is recognized, but i can't create entity data model, because there is no Firebird's provider in provider's list.


Better to use MSI packages that are now available. For both provider as well as DDEX. It will take care of registering DDEX etc. for you. Don't forgot to click "Advanced" button to select proper versions.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号