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

后端 未结 4 1111
情歌与酒
情歌与酒 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:30

    As the the table has the primary key in SQL Server, re-addthe table in the linq2sql designer.

    If that were not the case, you can configure which properties are part of the primary key by hand on the designer.

提交回复
热议问题