MVC3 Entity FrameWork4 Error: {"Store update, insert, or delete statement affected an unexpected number of rows (0). Refresh ObjectStateManager entries."}

ERROR:
{"Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. Refresh ObjectStateManager entries."}

CAUSE:
Some fields of Entity is not passed back from the Strongly Typed Views to the Entity.

FIX:
You have to make sure all Non Nullable fields are atleast in the 'Hidden' Field in the View , if the view is tightly bound to the direct Entity Model.

Comments