0

enter image description here

the image is the project folder and files.

this is what I doing:

1.Create a Console Project. 2.in the Nuget Console input "install-package BLToolkit" 3.in the Nuget Console input "install-package MySql.Data" 4.Copy the Templates folder to root directory. 5.add a new .tt file to root,and write:

    <#@ template language="C#"  debug="true"#>
<#@ output extension=".generated.cs"   #>
<#@ include file="Templates\BLToolkit.ttinclude" #>
<#@ include file="Templates\MySql.ttinclude"    #>
<#
    ConnectionString = "Database=test;Data Source=127.0.0.1;User Id=root;Password=123;pooling=false;CharSet=utf8;port=3306";

    Namespace = "ConsoleDemo";
    DataContextName = "DataModel";

    GenerateModel();
#>

but if I build the project,or exec the .tt,more wrong: enter image description here It's says "Can't find the class or namespace "GeneratedTextTransformation".

I'm tring day and day,and on mssql it's OK,but on mysql,too wrong.

any body know why? help me!

thanks!

Du Jianyu
  • 61
  • 6

1 Answers1

0

I' facing similar problem in the past, and I ends up using SSMA for MySQL.

The idea is generating an identical SQL Server database, and use that to generate your DAL. Requires more work, but at least it works :)

andri
  • 1,021
  • 1
  • 9
  • 16