Since the moment I first heared of the Guidance Automation Extensions (GAX) for Visual Studio, I considered this a very usefull feature. GAX and especially GAT (Guidance Automation Toolkit) allows you to create packages for Visual Studio that help the programmer in executing repetitive tasks as well as respecting certain guidelines. GAX/GAT also was supposed to make the delevopment of certain Visual Studio extensions a bit easier. Creating such packages though still remains a nifty job in my opinion but it offers great perspectives once you get a hold of it. One of the example Guidance packages is the Data Access Guidance package (this was renamed to Repository Factory on codeplex). The Data Access Guidance package helps you create Data Accessors based on database tables and stored procedures, with the use of Enterprise library. This package has some drawbacks the way I see it. First it generates rather complex code based on factories etc. which isn't always interesting when you are usually creating smaller projects. Second, it is tightly coupled with SQL-Server (at least from my point of view), again usefull when you only use SQL-Server. Third it uses Enterprise Library, great stuff, but way to much overkill again for some smaller projects.

So here is my solution. I took the Data Access Guidance package and reworked it a little bit:

- It generates simple Data entity and DataAccessor classes
- It uses generated or custom SQL statements in stead of stored procedures
- It has a rather generic Data Access class that makes use of the generic Data classes from System.Data.Common, so you can choose your preferred database provider type using the configuration file
- Although it currently only works for SQL-Server as well, is has a pluggable architecture that allows easy emplementation of other database engines like MySql or Access

You find the source code to this package here

The package installer works with VS 2005 and GAX 1.3 (july 2007). It might work on VS 2008 but I didn't have the time to rebuild and test it yet.

Following links should help you install it and understand the code:

- Repository factory on codeplex
- Guidanceautomation.net
- Jelle Druyts blog on creating guidance packages
- Guidance automation website

Hope you enjoy it.