The property 'name' is part of the object's key information and cannot be modified. Entity Framework

后端 未结 6 1703
无人共我
无人共我 2020-11-29 11:00

I am trying to update a record and I get this error message after the context.SaveChanges();

The property \'name\' is part of the object\

6条回答
  •  粉色の甜心
    2020-11-29 11:48

    Probably name is a part or full Primary Key for your EAT_SourceNames entity. You cannot modify object's PK, is it EF's limitation (see this thread).

提交回复
热议问题