Generate an Enum from a SQL Server Database Table

I have a lookup table in SQL Server and a corresponding enum in my code – two different sources that represent the same thing. The problem I...