c# - Syncing referential integrity tables and enums -
I think this question periodically, so I thought I would ask you about it. Suppose my database table looks like this: Table: Visibility ID value - ----- 0 visible 1 invisible 2 collapsed This is a table to ensure only one table. It is basically an enumen stored in the database for the purpose of ensuring that any visibility values that appear in other tables, Are always valid. At the end of my face, I have some options. I can ask this table and give it a dictionary & lt; String, int & gt; or dictionary & lt; Int, string & gt; I can store in . I can write an ANM manually and only manually edit the value in rare event that there is a change in the table. E.g., Public Enum Visibility {visible, invisible, collapsed} Something else ???? What would you advise and why? Thank you. This kind of fairly trivial stuff for me, I usually go with an enum, I like this with you. I can recognize that I think it is not entirely right ... but in my opin...