Entity Framework - Optimistic Concurrency Issue

Posted by Cranialsurge on Stack Overflow See other posts from Stack Overflow or by Cranialsurge
Published on 2010-05-24T23:25:58Z Indexed on 2010/05/24 23:31 UTC
Read the original article Hit count: 405

I have a windows service that runs every 10 seconds ... each time it runs, it takes some test data, modifies it and persists it to the database using the EntityFramework. However, on every second run, when I try to persist the change I get the following Optimistic Concurrency Exception:-

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

I know for a fact that there is nothing else writing to that DB but my service which updates records every 10 seconds. What could be causing the concurrency exception here ?

© Stack Overflow or respective owner

Related posts about entity-framework

Related posts about concurrency