Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Build class from database table or view
 

Build class from database table or view

I would like to create a simple recipe that builds a partial class from a singledatabase table. I would like it to:

1) build member variables and properties from fields

2) allow me to select stored procedures for CRUD functions and build them as static methods

Does anythign like this already exist? I would like to add a class to a project, name it, and run this recipe. Maybe it is two recipies so I could create a DAL class if I wanted.

I am trying to keep things simple and light weight. A T4 that I could edit and change would be ideal. Is there anything like this that already exists? Has anybody done this?

It feels like it takes a while to get up to speed on GAT/GAX and that there is a lot of time between investigating it and using it as a productivity tool in a production environment. I could use a couple of quick wins. The aboveand generating web controls (data grid, drop down lists for lookup tables, data entry web for for a class) would show the immediate value and power if I could get them running.

lcj  Friday, June 01, 2007 1:07 PM
Yes, sure. But my is similar to a original GP. If you want mine no problem. Please give me an email and I will send you. Might I will publish it on WSSF community site, if someone needs it can just download from there.
Regards,
Lukasz
faf38  Friday, June 01, 2007 3:38 PM
Hi,
Try to get WSSF Dec 2006 (Refresh).
You can extract Data Access Guidance Package there is a recipe called Create Data Repository classes from DA/BE project. The name of a recipe is not precise, sorry about that. You can use this GP to generate all data access classes for a table view, or even generate CRUD SPs. All stuff is based on a repository pattern. More info you will find in documentation of WSSF. I have modified this package so I can share it with you (e.g. my GP generates all classes associated with table to separate folder which can be easily changed, I have add some comments to a classess, and remove some not needed classes.).
HTH,
regards,
Lukasz
faf38  Friday, June 01, 2007 1:48 PM
I have that factory. Can you give me the one you modified?
lcj  Friday, June 01, 2007 3:32 PM
Yes, sure. But my is similar to a original GP. If you want mine no problem. Please give me an email and I will send you. Might I will publish it on WSSF community site, if someone needs it can just download from there.
Regards,
Lukasz
faf38  Friday, June 01, 2007 3:38 PM
What I was really looking for was generating the classes into subfolders based on their schema and appending the namespace with the schema name.
lcj  Friday, June 08, 2007 8:20 PM

You can use google to search for other answers

Custom Search

More Threads

• Exception: Unabe to et installer types in the C:\Program Files....\MetaGuidancePackageInstaller.dll assembly
• How to get SysListView32 of hiding object with IAccessible?
• Save the solution on a specific location
• GAX Uninstall fails on Vista
• GAT is VS Solution Centric
• WSSF
• Is it possible to call an action from a Converter ?
• Change rootnamespace key for guidace packages
• Guidance Automation Toolkit Removal error 2869
• web project template, to fire code in gac class.