CodeSmith Samples
When you install CodeSmith, you also get a wide variety of useful samples. These samples are of two types. Sample templates, located under the Documents\CodeSmith\Samples\vX.X\Projects\Templates folder, can be loaded into CodeSmith and used to generate code. Sample projects, located under the Documents\CodeSmith\Samples\vX.X\Projects\Samples folder, show you how you can extend and customize CodeSmith.
Sample Templates
CodeSmith installs sample templates in five folders. Each of these folders contains multiple sub directories templates.
ActiveSnippets - Templates demonstrating basic CodeSmith concepts in C#, Visual Basic, and JScript for use in Visual Studio.
Database - A collection templates that will generate Stored Procedures, Command Wrappers, Typed DataSets and more. The DBDocumenter templates are also located in this folder and can be used to document your database!
Examples - These examples show you how to use merge strategies, mapping file, master and sub templates, XMLProperty and much more.
Frameworks - The Frameworks folder contains all of our Framework templates. They include: PLINQO (LINQ to SQL), .netTiers, CSLA.NET, NHibernate, NuSoft and the Wilson ORMapper.
Other - Contains miscellaneous templates as well as the collection templates. The collection templates are set of collection classes from Christoper Nahr, based on work by Chris Sells. These include ArrayList, DictionaryList, HashTable, Queue, SortedList, and Stack, all with C# as their target language. See the ReadMe.html file in this folder for more information on using these templates.
Tip: You'll find many more useful templates contributed by CodeSmith users in the File Share forums at the CodeSmith Community Forums.
Sample Projects
Framework Samples - Contains sample projects like PetShop and Tracker implemented with our various Framework templates.
SchemaProvider source code - All schema provider source code can be found under the CSharp folder.
CSharp\BaseTemplates - This project includes the source code for the CodeSmith.BaseTemplates classes.
ConsoleSamples - This folder contains samples for use with the CodeSmith Console Application.
VSIntegrationSample - This project contains a sample of using the VS.NET integration to simulate generics with the CodeSmith Generator Project integration.
CustomPropertiesSample - This project includes the source code for the CodeSmith.CustomProperties classes.
APISample - This project demonstrates the use of the CodeSmith API.
TypedDataSetSample - This project contains a test application for the typed DataSet templates.