Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有聚集列存储索引的表。由于索引,此表不能有主键。它实际上有一个 ID 列,但我不能在上面放置索引。实体框架需要一个密钥,否则它将其标记为只读。我如何告诉 EF 密钥是什么?
答案是在 edmx 中添加一个密钥。打开 EDMX,右键单击列并选择实体键