Error connecting to Mysql using EF6

Asked

Viewed 91 times

0

I’m getting the bug

'System.Data.Strongtypingexception: The value for column 'Isprimarykey' in table 'Tabledetails' is Dbnull

Whenever I try to connect to a Mysql database using Entity Framework 6.

inserir a descrição da imagem aqui

Any hint to fix?

  • 1

    related: http://stackoverflow.com/questions/31961646/ef6-mysql-strongtypingexception-when-column-is-not-pk or http://stackoverflow.com/questions/33575109/mysql-entity-the-value-for-column-isprimarykey-in-table-table-details-is

  • these links teach you how to use the codes use <<database name>>&#xA; set global optimizer_switch='derived_merge=OFF'; what they mean?

  • got yes. I want to know what these commands mean. what their function is?

  • 1

    https://bugs.mysql.com/bug.php?id=79163 I believe it is a bug in the Mysql version from what I saw in the reply, if you have already done the attribution of the command? the commands solve the problem do not say why it has to be done this, sorry Soen link I just replied.

  • it did work. thanks

  • if you want to write down the answer so I can give you the score, feel free

Show 1 more comment

1 answer

0


With the links Virgilio Novic gave me,:

Stop the Mysql service;

Re-start the Mysql service;

Execute the following command:

use NOME_TABELA;
set global optimizer_switch='derived_merge=OFF';

Browser other questions tagged

You are not signed in. Login or sign up in order to post.