我使用带有 Web API Asp.Net 的 Code First 实体模型
我总共需要 3 个表
第一个表(Table1)
包含一些具有唯一 ID 的信息让我们说它就像
string id
string model
第二个表(Table2)
包含有关用户的一些信息。可以说是
string Id
string name
string company
现在我需要第三张桌子。它只能用作连接表,并且包含
Table1 ModelInfo
Table2 UserInfo
但它向我显示了一个错误,即无法在没有unique id
. 但由于我的架构是我不需要unique id
我该怎么办?还是我需要改变我的架构?