Michael
Michael

Reputation: 13636

Use MySQL and Entity Framework 6 StrongTypingException error

I have some troubles to use Entity Framework 6 and MySQL. I use Visual Studio 2015 and Entity Framework6.

After I click finish button on this wizard window:

enter image description here

I get this error window:

enter image description here

Why do I get error above, and how can I fix it? I don't have a table named 'TableDetails'.

Upvotes: 0

Views: 75

Answers (2)

Azhar Ansari
Azhar Ansari

Reputation: 104

Entity Framework (version 6.1.3) and MySQL Server (5.7)

  1. Open Services (services.msc) and restart MySQL57 service.
  2. Execute the following commands in MySQL. use <>; set global optimizer_switch='derived_merge=OFF';
  3. Update the .edmx.

I hope this will work for u.

Upvotes: 1

Michael
Michael

Reputation: 13636

Thanks CodeCaster I found solution in forum he referenced in comment above.

Use this command in MySQL command line client:

use <<database name>>;
set global optimizer_switch='derived_merge=off';
set optimizer_switch='derived_merge=off';

Upvotes: 0

Related Questions