score:0

before saving your changes, are you making sure that all not-null properties have a value?

in my case i had to add a hidden value in the view, so the primary key would be posted back to the server.

@html.hiddenfor(model => model.id)

score:0

for me, the problem was unique index on some of the columns in my database. violating the index was causing this error to be displayed.

but when i was searching for the solution i found there can be other reasons for this error also , like make sure key have values and are not null , check concurrence setting for the column .


Related Query

More Query from same tag