I am trying to wrap my head around items that will be displayed in a drop down control of a web application and these items are value objects in my model. As an example, let’s assume I an entity named RFI (request for Information). That RFI has a value object named State. The possible state values as prescribed by the business are: Created, Open, Suspended, Closed. These values need to be displayed to the user and are updatable by the user (In some admin console). Since the values are only persisted on the entity, itself, what is the best method to store the list of possible values?
I am using a database (SQL 2008) and an ORM framework (Entity Framework 4.1), however I am not sure the database is the best place to store the possible values. I have heard of some users creating resource files (XML documents, CSV files, etc) for such things. What are others in the community doing in a scenario like this and what are some recommended best practices.
A lookup table in the database called “State” (or similar) with 4 rows.
This will be a foreign key in the “RFI” table.
Reasons:
Capture the model with Object Role Modelling for example and see what that produces.