Spec-Zone .ru
спецификации, руководства, описания, API

22.2.3.14. DDL T4 Template Macro

MySQL Connector/Net 6.3 introduced the ability to 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 listbox.

Figure 22.39. 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 22.40. DDL T4 Template Macro - Generate Database Wizard

DDL T4 Template Macro - Generate Database Wizard