title: Automatically create an Enum based on values in a database lookup table?
body: <p>How do I automatically create an enum and subsequently use its values in C# based on values in a database lookup table (using enterprise library data layer)?</p>
  
  <p>For example, If I add a new lookup value in the database, I don't want to have to manually add the extra static enum value declaration in code - I'd like to keep the enum in sync with the database.</p>
  
  <p>Is there such a thing as this? </p>
  
  <hr>
  
  <p>I don't want to create a code generated static enum (as per <a href="http://en.wikipedia.org/wiki/The_Code_Project" rel="noreferrer">The Code Project</a> article <em><a href="http://www.codeproject.com/KB/database/EnumGenerator.aspx" rel="noreferrer">Enum Code Generator - Generating enum code automatically from database look up tables</a></em>) and would prefer it to be completely automatic.</p>