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)?
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.
Is there such a thing as this?
I don't want to create a code generated static enum (as per The Code Project article Enum Code Generator - Generating enum code automatically from database look up tables) and would prefer it to be completely automatic.