SqlSugar源码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.2 KiB

7 years ago
<#@ 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" #>
<#
//CTRL+S将会执行该文件的代码,自动作生实体
JsonConvert.SerializeObject(new{});
//当前项目目录
string projectDir = Host.ResolveAssemblyReference("$(ProjectDir)");
//解决方案目录
string solutionDir = Host.ResolveAssemblyReference("$(SolutionDir)");
var db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = "server=.;uid=sa;pwd=sasa;database=SqlSugar4XTest", DbType = DbType.SqlServer, IsAutoCloseConnection = true });
db.DbFirst.CreateClassFile("c:\\T4");
#>