Page 1 of 1

TypeLoadException with with EntityFramework 5 and FrameWork.Net 4.0

Posted: Wed 12 Feb 2014 14:48
by hro
Hi,

I'm using dotConnect for MySQL version 7.8.322 with EntityFramework 5 (Devart.Data.MySql.Entity.dll for EF5) and FrameWork.Net 4.0 (System.Data.Entity.dll version=4.0.30319.1) and I get the following exception when executing Linq query :

System.TypeLoadException: Method 'SetDbParameterValue' on type 'Devart.Data.MySql.Entity.MySqlEntityProviderServices' from assembly 'Devart.Data.MySql.Entity, Version=7.8.322.0, Culture=neutral, PublicKeyToken=09af7300eec23701' is overriding a method that is not visible from that assembly.

I've got the same issue with dotConnect for Oracle version 7.9.322.

When I execute the same code with EntityFramework 5 (Devart.Data.MySql.Entity.dll for EF5) and FrameWork.Net 4.5 (System.Data.Entity.dll version=4.0.30319.18034) it works fine.

It works too with with EntityFramework 5 (Devart.Data.MySql.Entity.dll for EF4 ????) and FrameWork.Net 4.0 (System.Data.Entity.dll version=4.0.30319.1) ?????

Is the dotConnect for MySQL driver 7.8.322 compatible with with EntityFramework 5 and the Framework 4.0 ?

Thanks for your response.

Re: TypeLoadException with with EntityFramework 5 and FrameWork.Net 4.0

Posted: Thu 13 Feb 2014 08:43
by CConnes
It seems the Dll in the folder C:\Program Files (x86)\devart\dotConnect\MySQL\Entity\EF5 is referencing System.Data.Entity instead of EntityFramework.

Re: TypeLoadException with with EntityFramework 5 and FrameWork.Net 4.0

Posted: Thu 13 Feb 2014 15:38
by Shalex
The EF5-specific functionality (enum support, spatial data types, etc) is available only in .NET Framework v4.5. If you are working with .NET Framework v4.0, please employ EntityFramework.dll v4.4 (not 5.0) and \Program Files (x86)\Devart\dotConnect\MySQL\Entity\EF4\Devart.Data.MySql.Entity.dll.