C# Data Tier Generator SourceForge Logo
Source Forge Project Information Download


The C# Data Tier Generator creates SQL scripts files and C# classes based on a specified database.
It takes the following paramters:

Based on that information, it queries the database for all user tables (tables created in the database by somthing other than SQL Server itself), and iterates through each table, creating appropriate files.

The files it generates are created in two seperate folders:
<ApplicationPath>\SQL Scripts
<ApplicationPath>\Data Access Classes

SQL Scripts

Several files are created for each user table in the database. Each file contains SQL script for creating stored procedures. The stored procedures contain the following functionality:

Note: each stored procedure is contained in its own SQL script file.

The formula for creating stored procedures is as follows:

					proc + TableName + StoredProcedureType
					@Paramter DataType,
					@Paramter DataType,
Examples of scripts:

C# Data Access Classes

Whereas seperate script files are generated for each procedure, there is only one class file generated for each table.

The formula for creating class files is as follows:

				public class cls + TableName {
					public void Insert(...) {
						<SqlDb code>

					public void Update(...) {
						<SqlDb code>


For comments, updates, and general project information, please see the Source Forge Site.

SourceForge Logo