Insert record with Subsonic 3.0

I have a problem with subsonic. I am trying to insert a record into a table with a primary key set for autoincrement authentication. I have an exception:

Cannot insert explicit value for identity column in table 'Zaposleni' when IDENTITY_INSERT is set to OFF.

      

How should I do it? Please can anyone provide me with an example?

I must mention that I am using ASP.NET MVC and SubSonic objects to bind the view model.

+2


source to share


1 answer


when IDENTITY_INSERT is OFF.



It's your problem. If you have established your identity in your database, be sure to restore it - this makes the PC non-writable.

+1


source







All Articles