ObjectContext.SaveChanges() violates primary key, throws UpdateException?

后端 未结 2 1760
深忆病人
深忆病人 2020-12-20 02:17

Paraphrasing from this MSDN documentation ...

An INSERT statement is generated by the Entity Framework and executed on the data source when SaveCh

2条回答
  •  庸人自扰
    2020-12-20 02:34

    EDIT

    If you are trying to do an insert, then do not fill in the PK field (I'm guessing that's StudentID).

提交回复
热议问题