SqlSugar/Src/Asp.Net/MySqlTest/T4/SugarTemplate.tt
2017-09-13 14:38:43 +08:00

31 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Xml" #>
<#@ assembly name="System.Xml.Linq" #>
<#@ assembly name="System.Data" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="SqlSugar" #>
<#@ import namespace="Newtonsoft.Json" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Web" #>
<#@ assembly name="$(SolutionDir)\SqlSugar\References\Newtonsoft.Json.dll" #>
<#@ assembly name="$(SolutionDir)\SqlSugar\bin\Debug\SqlSugar.dll" #>
<#@ assembly name="$(SolutionDir)\SqlSugar\bin\Debug\MySql.Data.dll" #>
<#
//CTRL+S将会执行该文件的代码自动作生实体
//当前项目目录
string projectDir = Host.ResolveAssemblyReference("$(ProjectDir)");
//解决方案目录
string solutionDir = Host.ResolveAssemblyReference("$(SolutionDir)");
var db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = "server=localhost;Database=SqlSugar4xTest;Uid=root;Pwd=root", DbType = DbType.MySql, IsAutoCloseConnection = true });
db.DbFirst.CreateClassFile("c:\\MySqlT4");
#>