[英]deleting primary key in entity framework code first
How do I go about deleting primary key like a product_id
in Entity Framework code-first, if later on a primary key is not needed? 如果以后不需要主键,该如何在Entity Framework代码中先删除主键(如
product_id
? Is it by simply removing the flag [id]
or is there some other way also? 是仅删除标志
[id]
还是其他方法?
EF does not support tables without primary Keys. EF不支持没有主键的表。
BTW the attribute is [Key] BTW该属性是[Key]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.