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? Is it by simply removing the flag [id]
or is there some other way also?
EF does not support tables without primary Keys.
BTW the attribute is [Key]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.