I'm currently building a new app based on a legacy database. In the app, there are many "list" tables that have the following format:
table listLanguages
{
PrimaryId bigint;
Item varchar(30);
}
...with some sample entries like this:
PrimaryId Item
1 English
2 French
3 Spanish
...
They were used to populate dropdown lists in web forms that did things like edit client details. When they were saved in a client record, the full string value was used, and not the ID. I have to keep this behaviour.
My question is: what is the best way to map these in my domain model using NHibernate?
I cannot change the structure of the database, and there are many list tables (I'd say about 40).