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

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

    LINQ does not allow to insert data into table without primary key. To achieve the insert data with table without primary key you can either use store procedure or create a query and execute using LINQ. Below link provide good explanation of the same.

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

提交回复
热议问题