Visual Studio 2013 - execute Model.edmx.sql via MySQL?

I am studying how ADO.NET models work in the Entity Framework with MySQL. I create a new test model, and then select "Create a database from the model"
It creates for me a new file "model_name.edms.sql" - the actual MySQL script to create the database.
However, to execute it, I have to "Connect to the server", which is used by default as SQL Server 2012. But in my case, I use MySQL, and not MS SQL Server. I have no instance of SQL12, im working with MySQL

How do I change it to connect to MySQL?

PS I know that I can use the "New Request" directly in the database and copy / paste the contents of the file and execute. I can also use MySQL Workbench and many other applications, however, I work in VS2013, where most of the already integrated tools, I can not assume that the SQL files in VS13 can be executed only through MS SQL12

+4
source share
3 answers

I just ran into the same problem and how to solve it. I am using VS 2010 Ultimate, but I think it is the same in VS 2013.

-, ( sql) , , "Transact-SQL Editor" , , MS. MS.

MySQL VS (, , ), :

  • ( View- > Toolbars) MySQL. MySql.
  • ( " MySQL" ), , MySql. ​​ MySql script.
  • sql, EDMX, 'MySql script.
  • script "MySql script" .

. , -, VS.

,

Cheerio

+3

-, , MySQL Visual Studio. / (, , ).

VS, Server Explorer, . , , "" ( 3306). MySQL Workbench. EDMX MySQL, , SQL Server.

Oracle http://dev.mysql.com/doc/connector-net/en/connector-net-visual-studio-making-a-connection.html.

EDIT: , , EDMX SSDLToMySQL.tt DDL. SSDLToSQL [].tt - .

0

If you rename the whatever.edmx.sql file to whatever.edmx.mysql file, it will open in the corresponding tool and allow you to connect to the MySQL database server and run the script.
Perhaps at some point the generator will be updated to create an EDMX file with ".mysql" instead of the .sql file extension to begin with.

0
source

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


All Articles