When I tried to normalize the database schema and map it in the Entity Framework, I found that in the end it could be a lot of lookup tables. As a result, they will contain only key pairs and values. I would like to combine them into one table, which basically has two columns “Key” and “Value”. For example, I would like the addresses Addresses.AddressType and Person.Gender to point to the same table, but make sure that the navigation properties only return rows that apply to the corresponding object.
EDIT: Oh. I just realized that I left this point:
It seems that the problem is with the TPH type, but all the reading I have shown indicates that you start with fields in the parent and transfer the fields of the inherited children. I have no fields to move here, because usually there will only be two.
You must specify many key-value pairs for the domain. Some of them will change from time to time, others will not. Instead of choosing and choosing, I just want to make everything editable. Due to the number of these kinds of properties that will be used, I would prefer not to maintain a list of enumerations that require recompilation, or ultimately with a large number of lookup tables. So, I thought this might be a solution.
Is there any way to present such a structure in EF4? Or am I barking the wrong tree?
EDIT: , , , , EF. , . , EF?