13.1. Problem

As a developer, you are supposed to create systems to make business processes more efficient. Well, now it's time to help yourself out by writing a code generator that can handle up to 80 percent of the repetitive code needed for the stored procedures, data classes, and business classes. Once you have a code generator in place, you can concentrate on more important things — like playing golf or creating your own blog. If you're really lucky, you work in a shop that measures performance by the number of lines of code you write. You could be making ten times your current salary by the end of the year with a code generator!

This chapter builds a code generator that can be accessed through the Add New Item menu option in the Solutions Explorer. The code generator will enable you to choose a table and generate an SQL file for the stored procedures, a data class, an edit object class, and an edit object list class. I can tell you from experience that code generators save you a tremendous amount of time, and it is worth investing some time into creating your own code generator even if you don't use the pattern in this book.

Get ASP.NET 3.5 Enterprise Application Development with Visual Studio® 2008: Problem - Design - Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.