如下所示,有一个枚举值的查找表,我想在表的枚举值和查找表的LookupKey列(而不是查找表的 ID 列)之间创建关系。
查找表:
ID | LookupType | LookupKey | LookupValue |
101 | Status | 0 | Passive |
106 | Gender | 1 | Male |
113 | Status | 1 | Active |
114 | Gender | 2 | Female |
118 | Status | 2 | Cancelled |
Run Code Online (Sandbox Code Playgroud)
主表:
ID | Status | Gender | Name | ...
1 | 0 | 1 | John Smith | ...
2 | 1 | 2 | …Run Code Online (Sandbox Code Playgroud) asp.net-mvc entity-relationship entity-framework entity-framework-6 ef-fluent-api
asp.net-mvc ×1