随笔分类 -  Code Smith

介绍CodeSmith的使用方法以及如何快速的编写模板。
摘要:一直用CodeSmith,生成oracle的代码, 最近要对mysql做操作, 发现CodeSmith连接MySQL错误, 提示"未能加载文件或程序集“MySql.Data, Version=5.0.7.0, Culture=neutral,PublicKeyToken=c5687fc88969c44d”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来... 阅读全文
posted @ 2010-11-17 17:12 Jolly-zhang 阅读(211) 评论(0) 推荐(0)
摘要:1:CodeSmith 一款人气很旺国外的基于模板的dotnet代码生成器官方网站:http://www.codesmithtools.com官方论坛:http://forum.codesmithtools.com/default.aspx 版权形式:30天试用开源:否需要先注册确认后才能下载 2:MyGenerator MyGenerator是又一个国外很不错的代码生成工具,有人觉得比CodeS... 阅读全文
posted @ 2008-06-25 15:29 Jolly-zhang 阅读(366) 评论(0) 推荐(0)
摘要:.netTiers is not free. It used to be free, but then Eric J. Smith changed his pricing model and yanked the free version out from under the community that made codesmith a booming product. In my opin... 阅读全文
posted @ 2008-06-25 12:09 Jolly-zhang 阅读(761) 评论(0) 推荐(0)
摘要:1.1. 概述: 使用NetTier模板生成的.net代码,包括完整的数据层,使用的技术是微软的 EnterpriseLibrary1.1版本,对应每张表都生成相对应的增删改查函数和存储过程,在查询中支 持多字段查询和翻页。数据层为工厂模型,只要调用DataRepository 类即可获取相应表的接 口实例,然后可以对改表进行操作了。对于多表关联操作,在父表中可以获取子集的查询记 录,保存在ILi... 阅读全文
posted @ 2008-06-25 09:51 Jolly-zhang 阅读(374) 评论(0) 推荐(0)
摘要:01.Getting started -required ChooseSourceDatabase 选择数据库 MappingFile Mapping文件位置(会根据output目录自动更改,不需要设置) OutputDirectory 文件输出目录 RootNameSpace 根节点的命名空间 01b.Filter by Individual Objects - Optional EnumT... 阅读全文
posted @ 2008-04-08 17:49 Jolly-zhang 阅读(354) 评论(0) 推荐(0)
摘要://模板的基础知识 //任何模板都需要的第一句,用来指定模板编辑语言是什么,目标语言是什么: //接下来写模板需要从外界引入的参数 //在模板里面用到了codesmith的函数和方法,需要引入对应的包,一般是 我理解assembly 是引入dll,import 是引入dll里面的命名空间,这些dll有的是codesmith自己带的,对于vs.net提供的dll,都可以引入使用。 //所有c... 阅读全文
posted @ 2008-04-08 17:43 Jolly-zhang 阅读(288) 评论(0) 推荐(0)
摘要:在CodeSmith中,以下几个快捷键有助于我们快速输入。 1.Ctrl + Shift + C 在空行上,按下Ctrl + Shift + C后将会录入一个代码块。 2.Ctrl + Shift + Q 按下Ctrl + Shift + Q后录入一个脚本块。 3.Ctrl + Shift + V 对代码块反转,如有下面这样一行代码: 在两个大括号之间按下Ctrl + Shift +... 阅读全文
posted @ 2008-04-08 17:40 Jolly-zhang 阅读(203) 评论(0) 推荐(0)