The property 'Id' is part of the object's key information and cannot be modified

后端 未结 15 2329
天涯浪人
天涯浪人 2020-11-27 07:02

i\'m using Entity Framework 4.0 and having a silly problem that i can\'t figure out.

I have two tables:

  1. Contact: Id (primary key), Value, ContactTypeId
15条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-27 07:53

    For me the issue was caused by the lack of a Primary Key to my table, after setting a PK for the table the problem was gone

提交回复
热议问题