随笔分类 - T4
摘要://------------------------------------------------------------------------------ // // 此代码由T4模板自动生成 // 生成时间 by 大聪哥 // 对此文件的更改可能会导致不正确的行为,并且如果 // 重新生成代码,这些更改将会丢失。...
阅读全文
摘要:GetDbTables(string connectionString, string database, string tables = null) { if (!string.IsNullOrEmpty(tables)) { tables = string.Format...
阅读全文
摘要:# 使用说明 1. 把T4目录放在项目的根目录 2. 配置连接字符串,在tt文件的最底部 3. generateAllEntity.tt生成全部的实体类 4. generateSingleEntityByName.tt生成实体类根据表名 下载路径http://files.cnblogs.com/fi
阅读全文
摘要:1. 2.页面插入 System.Diagnostics.Debugger.Launch(); //即可开始调试 3.打断点 System.Diagnostics.Debugger.Break(); //获取项目路径string projectPath = Host.ResolveAssemblyReference("$(ProjectDir)");//asp.net mvc中Models文...
阅读全文
摘要:如:我用的网上的生成多文件的一个include文件。 生成多文件时,默认会生成一个以自己名字命名的文件如: 有一个demo.tt文件,生成时会出来一个demo.cs文件(默认情况下) 解决方法: Found a trick/hack! or Visual Studio 2012 neither outputs the default file, nor complains about...
阅读全文