Documentation Home
MySQL and Windows
Related Documentation Download this Excerpt
PDF (US Ltr) - 3.6Mb
PDF (A4) - 3.6Mb


MySQL and Windows  /  MySQL for Visual Studio  /  DDL T4 Template Macro

5.9 DDL T4 Template Macro

Convert an Entity Framework model to MySQL DDL code. Starting with a blank model, you can develop an entity model in Visual Studio's designer. Once the model is created, you can select the model's properties, and in the Database Script Generation category of the model's properties, the property DDL Generation can be found. Select the value SSDLToMySQL.tt(VS) from the drop-down list.

Figure 5.58 DDL T4 Template Macro - Model Properties

DDL T4 Template Macro - Model Properties

Right-clicking the model design area displays a context-sensitive menu. Selecting Generate Database from Model from the menu displays the Generate Database Wizard. The wizard can then be used to generate MySQL DDL code.

Figure 5.59 DDL T4 Template Macro - Generate Database Wizard

DDL T4 Template Macro - Generate Database Wizard