sql - Why identity_insert changed to OFF -
my database working fine until added code model (id)
[key] [column(order = 0)]
after added started getting error
identity_insert set off
therefore had alter
[key] [column(order = 0)] [databasegeneratedattribute(databasegeneratedoption.identity)]
so question why [column(order = 0)]
cause auto-increment switch off?
this error means trying assign value explicitly column database automatically assigns it.
the error because made property primary key database responsible insert identity , identity insert off.
sql asp.net-mvc entity-framework
No comments:
Post a Comment