Can I use EntityFramework with MemSQL?

I am trying to create an entity model for 2 super simple tables that I created in MemSQL:

CREATE TABLE foo(id int primary key auto_increment, name varchar(20));
CREATE TABLE t(id int primary key auto_increment);

I am using Entity Framework 6.1.x. I installed the MySQL connector since MemSQL is a binary protocol compatible with MySQL, added the new Entity Model ADO.NET to my project, and went through the wizard. Fulfillment of the following questions:

  • In most cases, the wizard turns off trying to request a list of tables and views. Perhaps this is because the MemSQL cluster has been removed in Azure. I will try to create a local vm cluster tomorrow and try again.
  • The time when he manages to read the list of tables and views, I select both tables and then create an Entity Framework model. I get the following error:

The model cannot be generated due to the following exception: "System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. For more details, see Internal Exception. ---> MySql.Data.MySqlClient.MySqlException: You have an error in SQL syntax; check the manual that matches the version of MySQL server for the correct syntax to use next to "LEFT" (COLUMN_TYPE, 10) = "tinyint (1)", "bool", IF (LEFT (COLUMN_TYPE, 10) "on line 47

So I'm at a loss. Can I use Entity Framework with MemSQL?

+4
source share
1 answer

, LEFT, MemSQL . MemSQL 5 2016 .

+2

Source: https://habr.com/ru/post/1620484/


All Articles