Recently I was working on a project that was initially started back in 2005. The solution is divided in several layers: entity layer, business layer, data layer and UI. For the first three layers CodeSmith is used to generate base classes based on the database schema. Extra functionality is added by implementing derived classes. Every database change or new common functionality can be added for all classes by changing a CodeSmith template. Very handy if there are more than 100 objects per layer.