Can't perform Create, Update or Delete operations on Table because it has no primary key

后端 未结 4 1106
情歌与酒
情歌与酒 2020-12-10 11:10

I\'ve been trying to insert row in the table having an identity column RequestID (which is primary key as well)

    HelpdeskLog logEntry = new HelpdeskLog {          


        
4条回答
  •  爱一瞬间的悲伤
    2020-12-10 11:18

    Delete the table and then reinsert it. You must make sure there is a little small key next to the field before you do this. Recompile your project and all should be fine.

    Just because you updated the dabase does not mean the DBML file somehow automatically updated. It does not, sorry.

提交回复
热议问题