I'm trying to connect to a db2 instance using EF6 and the new IBM Entity Framework data provider found here
have added the provider to the app config:
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="IBM.Data.DB2" type="IBM.Data.DB2.EntityFramework.DB2ProviderServices, IBM.Data.DB2.EntityFramework, Version=10.5.5.6, Culture=neutral, PublicKeyToken=7c307b91aa13d208" />
</providers>
and connection string looks like so:
<add name="DB2" connectionString="Server=blah;Database=meh;Uid=user;Pwd=pword;" providerName="IBM.Data.DB2" />
I can instantiate a context but when I try to run a query it throws a MethodAccessException
:
Attempt by method 'IBM.Data.DB2.EntityFramework.DB2ProviderServices.GetDbProviderManifestToken(System.Data.Common.DbConnection)' to access method 'IBM.Data.DB2.DB2Trace.Entity_CheckDB2Trace()' failed.
I have installed the DB2 Version 10.5 Fix Pack 5
Any ideas as to what I might be doing wrong?
IBM.Data.DB2.DB2Trace.Entity_CheckDB2Trace()
is marked internal and is being called from another namespace