@Bas: We're not ... it's way above the DB layer. The code wraps other, more complex boilerplate that you'd normally have to write. In our case, we have metadata defined in XML and a programmer normally would have to write a bunch of code to tie into the metadata, so we use T4 templates to build up that code for them.
In any scenario where code generation makes sense, however, you'll find the same principals in action - wrap more complex processes and/or objects into simpler processes and/or objects. However, at some point you wonder, isn't there a better design that eliminates all this repetitive boilerplate code? Yes, there probably is. In the meantime, while we discover that, code generation can be an excellent stop-gap measure to take.