I decided to package a few CodeSmith Templates I’ve written lately to give a little something back to those in the CodeSmith Community who have provided so much valuable information to me in the CodeSmith Template Share Forum and elsewhere. (I really do need to spend more time digging into the forum templates!) This homebrewed CodeSmith package is also [selfishly] intended to motivate me to keep thinking about Code Generation in my everyday work and as a result continue to add new templates to the package over time.
The ZIP is located at /x/a/dbvtCodeSmith1.0.zip. The DESCRIPTIONS.TXT file is shown below.
CodeSmith Version: 3.0
This doc provides a brief description of utility templates. I hope to add to this package over time as I create more templates in my everyday work.
Last Updated: 7/12/2005
Creates a simply, empty business object as used in dotText. No instance method.
Reads from existing SQL Table. Typically I do a “select * into TmpTable from SomeQueryOrView” and add a primary key manually.
Generates an ADO.NET 2.0 Add[DataTable]Row() method from a DataRowView object.
Reads from existing SQL Table as in BusinessObject.cst above.
Also creates an empty tablerow.
Ex: MyDataSet.dtProjectsDataTable _projects = new MyDataSet.dtProjectsDataTable();
“No Projects Available for this view”,
Reads values from SQL Table to create a Enum. Used primarily for enums based on tables which change throughout development process.
Ex: public enum ViewType
User = 0,
MarketSegment = 1,
Company = 2
Codebehind class for templates.