Linq to SQL: Why am I getting IDENTITY_INSERT errors?

前端 未结 7 635
长发绾君心
长发绾君心 2020-12-17 02:49

I\'m using Linq to SQL. I have a DataContext against which I am .SubmitChanges()\'ing. There is an error inserting the identity field:

Cannot insert explicit value for         


        
7条回答
  •  囚心锁ツ
    2020-12-17 03:24

    seems like your ID is being assigned somewhere (even if just defaulting to 0) - would you care for posting some of your LINQ code?

提交回复
热议问题