C# AllowedValuesAttribute and DropDownListFor helpers
Currently i'm making an application that makes good use of dynamic C#, ie the ability to make user-customized formulas. The application has been, so far, making use of several enum fields. Since I had to make the enums accessible by users who are not tech-savy, I needed a way to make them into strings without going too deep. Since .NET is an incredibly powerful tool, it gave me an excuse to spend a good few hours learning more about reflection and putting together an attribute with validation in case user wants to edit field manually (not likely) and allow using the field as a standard dropdown for more safety and control. This way, inside the dynamic formulas, one can simply compare the field value to a string.
Without further ado, here is the gist.