Using T4 Templates to Generate Enums From Database Lookup Tables

The major project we've been working on had a non-unusual requirement: take these SQL database tables and convert them to enumerations we can use over a service. A quick Google search found some code that did exactly what we wanted, so of course we (ok, I) copied-and-pasted that code into our solution and BAM, it worked like a charm. Problem was, when someone asked me to explain what it did, I couldn't. I can't stand not understanding something, especially not... Read more >