Hi
I have an enumeration of delivery status codes. And when I save delivery data to the database they are stored with a foreign key to a table containing the same data (i.e. the same delivery codes)
What is the best strategy for keeping an enumeration in synch with data in a database?
Do you just remember to add to the enumeration when a new code is added to the database?
Or load the data into a dictionary when the application starts? And use the dictionary instead of an enumeration? Though this means that I don't have a strongly typed representation of the data - which I definitely want.
Or something else?
The data is not very volatile but new codes do get added once every blue moon
Would appreciate any suggestions.
thanks