"Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions."
App is using EF6.2
My colleagues do not get the error using the exact same code (pull my feature branch and run it). We are using VS2019 and Devart’s Entity Developer.
This all started after updates to my development machine e.g. VS 16.7.1, ED 6.8.1049, etc.
Pseudo code which is failing
Code: Select all
context.<model class>.AddObject(model); context.SaveChanges(); <= Error happens when this executes
I know how to handle optimistic concurrency so please don't suggest ways to do that. The problem is that suddenly working code has stopped working.
I have tried, removing the updates which applied, also used a separate PC - a fresh Windows install, with older versions VS 16.6.5 and ED 6.8.1019 (also repeated using latest versions) and I still get the same error.
Error also follows if I deploy code (VS Publish) to a Cloud service but not if a colleague deploys the same code.
Any ideas are appreciated.