简体   繁体   中英

Generate database from model using MySQL as database

I am using ASP.Net MVC2. I have a model with database design, and need to create a database from that model using MySQL as the back end.

I right-click on the model and select the generate database from model option, then I select MySQL as back end.

After that I can get a SQL query to execute. But when I execute the query, MS SQL Server is executing instead of MySQL.

Do you know how to make a database from the model using MySQL.

You can change the DDL generator under the properties of the Entity Model: DDL Generation Template . I was able to switch this from SSDLToMySQL.tt (VS) to SSDLToSQL10.tt (VS) , which gave me the MySQL script.

(I'm assuming you already have the MySQL connector for .NET installed, right? )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM