lcj

I am looking for a simple example of how to generate class files based on tables in a database.

If it had the following it would be even better:

table schema name used in namespace

FK example

I could also use a CRUD stored procedure creation example too.



Re: Visual Studio Guidance Automation Toolkit looking for simple example of class generation based on database schema

vga

The two best samples that I know of guidance packages dealing with database access are the GAT TechEd HOL (updated version included as a sample package in SFT) and the p&p Data Guidance Package.

Also, there is (in SFT) the DslIntegrationPackage which showcases how to generate multiple source files from the output of a single T4 transoformation, this is something you may want to look at if you're planning to generate multiple files from single trasformations and not the usual 1 to 1.

thanks,
-Victor.





Re: Visual Studio Guidance Automation Toolkit looking for simple example of class generation based on database schema

lcj

So installing all of the Clarious and DSL software is just the means to installing templates on my system that I could use as examples, right I would create a normal guidance package based on these examples but would not have to install Clarious or DSL, right





Re: Visual Studio Guidance Automation Toolkit looking for simple example of class generation based on database schema

vga

You will need to install these on your dev machine, where you would look and modify the samples. When deploying your guidance package to other users you will need to deploy the p&p runtime or the SFT runtime depending on what you used. This is necessary because these runtimes contain the built-in classes that allow you to easily achieve stuff like multiple output files from a single T4 template.

Is this more clear now

thanks,
-Victor.





Re: Visual Studio Guidance Automation Toolkit looking for simple example of class generation based on database schema

lcj

Somewhat. What I am really looking to do is get a handle on the pieces so that I understand them better more then modify a factory and use it.

If I could figure out how to do the following it would get me started understanding of GAT:

1) creates a folder in a solution

2) generates a class for each table in a database

3) creates private member variables and public properties for each field in a table

4) creates a CRUD stored procedure file for each table

5) builds methods based on SP's

6) adds a project to a solution

7) adds a reference to a project

The problem I find is that they are either a part of a larger package and then the examples get confusing, two many extras are added to the basic principles, or there are too many dependencies such as other pieces of software that are required.

If each one was a separate and discreet example and drilled down into the files that needed to be edited, created, and located I would be well on my way. I was trying to short cut doing it myself to see if anybody else had gone through the same exercise. This way I could move quickly from learning to implementing.

To your question, it is more clear but not exactly what I was looking for. I wanted to reduce the "clutter" or find out exactly what was required to accomplish these basic steps. I think if SFT is not required to accomplish these steps I do not want to complicate my learning.