Database Documentation Generation in CodeSmith
page 2 of 7
by Jason Alexander
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 31717/ 46

Properties - P2

Properties allow you to specific a property type. This allows CodeSmith Studio to validate and enforce the type of data you specify in specific strings, as well as hooking specific dialog windows for common types.

For example, instead of having to create properties for each piece of information I would need to build a connection string, I can simply set the property Type to "SchemaExplorer.DatabaseSchema" such as:


<%@ Property Name="SourceDatabase" Type="SchemaExplorer.DatabaseSchema" Category="Context"

Description="Database that the documentation should be based on." %>


This creates a property called "SourceDatabase" in the Properties window within CodeSmith Studio. There, a small button is located next to the property value area. Clicking the button brings up a new dialog box titled "Database Picker". These set of dialog boxes allow you to create, edit and delete common connections within your template.

After setting this property properly, this exposes a variable within your template corresponding to your property name, in this case "SourceDatabase". This variable is actually of type "DatabaseSchema", and allows you to navigate through your database schema, gathering any needed information.

For our purposes, we will be making heavy use of these objects, and the objects that it exposes, in order to retrieve specific information such as tables within the database, and columns within each table.


View Entire Article

User Comments

Title: Links problem   
Name: Ahmed Ammar
Date: 2009-08-02 10:20:41 AM
Link for download full sample is broken
Title: SE   
Name: Kunal Shah
Date: 2005-08-04 6:50:59 AM

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-04-18 7:51:21 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search