-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include Display/Description attribute data in a new column #33
Comments
+1 good idea. This would make it possible to add more detail to things that access the db directly. A pull request for this would be welcome. I'll hold off actually releasing it till v2 as it's a significant change to the schema and would need some thought in how to handle the transition for existing installations. I don't think I'd make it configurable, it would just always add it. Allowing the variation increases the complexity of what would have to be supported. |
Instead of using [Description("description")] could we use [System.ComponentModel.DataAnnotations.Display(Name="new name", Description="new description")]? When using the ASP.NET MVC html helper @Html.EnumDropDownListFor(m=>m.MyEnum) it uses the Display("Name="") text to populate the drop down. (https://msdn.microsoft.com/en-us/library/system.web.mvc.html.selectextensions.enumdropdownlistfor(v=vs.118).aspx) This could also allow the use of a Resource class as well |
Great minds think alike @jasonp123 - take a look at the linked pull request discussion |
ha.. I'm new.. ignore me :-) |
shouldn't affect anything Original patch by Svein Helge <[email protected]> #mailto:[email protected] PR #33
contribution from PR #33 - Svein Helge <[email protected]> extended the contribution to cover both test classes
Would like to have the ability to have Description as column.
The table would then look like this:
Id
Name
Description
It could be implemented as a setting.
var enumToLookup = new EnumToLookup();
enumToLookup.AddDescriptionColumn = true;
Since [Description("some name")] is used to override name we might need to add new attribute for this or redefine the usage.
The text was updated successfully, but these errors were encountered: