Generating Data Access Layer in WCSF Using WSSF Data Access Guidance Package
by David Hayden ( Microsoft MVP C# ), Filed: Web Service Software Factory
I mentioned earlier that you can successfully use the Data Access Guidance Package in the Web Service Software Factory to successfully generate a data access layer in a Web Client Software Factory Solution:
Enable Data Access Guidance Package in Web Client Software Factory Solution - Code Generation
Note how I mentioned earlier that the Data Access Guidance Package will eventually be removed from the WSSF in v3.0 and in a different location:
Data Access Guidance Package on CodePlex - Code Generating a Data Access Layer
I don't know of any problems using the Data Access Guidance Package in WCSF even though the Web Service Software Factory still comes with Enterprise Library 2.0.
I took the Web Client Software Factory and Enterprise Library 3.1 Sample Download from PnPGuidance and substituted my hand-written data access layer with one generated by the Data Access Guidance Package. Here are a few snapshots of creating the business entities, repositories, and stored procedures. In all, it couldn't have been anymore than 15 minutes to generate the items and maybe another 15 minutes to integrate it into my sample.

When all is said and done, we have a lot more classes when generating a data access layer using the Data Access Guidance Package, but this is because the code is refactored to include factories for all the database commands, etc. Here is the new Customers Module:

Many of the classes can be put in another assembly as they will be common to all of your repositories (e.g. Generic Folder ).
As soon as we get some new software factories for Visual Studio 2008 beta 2, we can use LINQ to SQL as another option for our data access layer.
by David Hayden ( Microsoft MVP C# )
Filed: Web Service Software Factory