Hey I have an application with a bunch of inproc caching and entity framework. When I want to write an update to an entity I reattach the cached copy. I track all things I\'
@LukeMcGregor hi,
I think I can offer a different perspective as someone who has the same problem.
After I have performed all the necessary checks, I can say that I prefer to get this error.
Because in my scenario: I wanted to include an object that caused a mismatch error. It's the location object in your scenario. If I add an object with an ID, I get this error because the ID in the previous object (the one that is not updated) does not match the updated ID.
But it's not a big problem. As a solution; If it is still on the UI side, the object may still be included if it still exists.
You will either empty the object when you receive the update request from the user. (= Null) Or you will update the object with the ID updated by the user before the service-side update (attach, modified ... whatever) and update it in this way.
That's it. It can remain as it is in the database and diagrams.