LINQ not updating on .SubmitChanges()

后端 未结 2 450
广开言路
广开言路 2020-11-29 09:47

Is there any reason something like this would not work?

This is the logic I have used many times to update a record in a table with LINQ:

 DataClasse         


        
2条回答
  •  無奈伤痛
    2020-11-29 10:53

    The table could not be updated properly because it had no primary key. (Actually it had the column but the constraint was not copied when I did a SELECT INTO my dev table). The DataContext class requires a primary key for updates.

提交回复
热议问题