Connecting to DB2 using EF6

I have a WPF application using EF6 and I need to connect to a DB2 database.

I have a data layer in a separate library from a main application. The connection string in App.config looks like this:

<connectionStrings>
    <add name="TIMSContext" connectionString="Database=DB2C;UID=blah;PWD=blahblah;Server=myServer:446;" providerName="IBM.Data.DB2" />
  </connectionStrings>

      

I have a link to the IBM DB2 EntityFramework package in my data library.

When I try to start, I get a message that the provider was not found.

If I try to include a reference to an IBM EF package in the main application, I get a type initializer error on startup.

+3


source to share


2 answers


I do not think that's possible. You need a license DB2 Connect

other than your company's iSeries license (someone please correct me if I'm wrong, I'd be very happy to hear about an alternative).

So we are forced to keep using myGeneration dOOdads at my company, which has not been supported for almost ten years. -.-



See this answer for details > ; I don't think that nothing has changed since then ...

+1


source


Obviously DB2 has problems with EF6 ... I fell back to EF5 and it all worked fine.



0


source







All Articles