Posts Tagged ‘Repository Factory’

Repository Factory – VisualStudio 2008

June 8, 2008 Leave a comment

The Repository Factory is a guidance package that automates creation of entity classes that map to database tables and repository classes to read and write those entity classes. The generated code removes the tedium of writing a persistence-ignorant domain model.

This package was originally published as the "Data Access Guidance Package" as part of the Web Service Software Factory but was later split out into its own project. Unfortunately this got kinda abandoned with the release of LINQ and therefore there is no support for VisualStudio 2008.

Here’s the statement from the Repository Factory team

"Repository Factory is done. There will be no more investment from P&P or Microsoft. Repository Factory was written for ADO.NET 2.0 and VS 2005. .NET 3.5 has many new database access options (with more coming), and a straight port to VS 2008 isn’t good guidance. LINQ, for example, enables newer ways to do queries that don’t fit very well with our repository generation. And right now we’re not convinced that the underlying Enterprise Library Data Access block even makes sense anymore."

So does that mean this project is dead? What about us poor folks who have been using the service factory with VisualStudio 2005 and now need to upgrade to VisualStudio 2008? Does this mean we cant upgrade to VisualStudio 2008 if we want to continue to use the guidance package?

Well the P&P team have released the final source code and is available for download. Porting over to VisualStudio 2008 is easy. After you download the source code from the site open the solution file in VisualStudio 2008 and follow the instruction on the convert solution wizard. Try and compile the project as is and it all compiles perfectly (you need to install the Visual J# redistributable for the solution to compile / build). If you try and register the recipe using the Register Guidance from the Guidance Package guidance it works great but the installer is another story. To make the installer work you must add/change arguments in all the custom actions as follow:

"/Hive=9.0 /Configuration="[TARGETDIR]Data Access Guidance Package.xml"

Note that changes applies just for the installer. Now rebuild the installer and it should create the setup files for the guidance package.