This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
When I try to update an entry, the program occasionally gets a OptimisticConcurrencyException, as expected. However, once I have gotten one, the client hangs in a never-ending OptimisticConcurrencyException loop, never getting anything done. Is there a known fix to this? |
|
|
You need to start a new unit of work, reload the offending entity into the new unit of work (so as to get the latest version), reconcile the two versions of your entity in the new unit of work, and save the new unit of work. Your existing unit of work (where the OptimisticConcurrencyException occurred) is stale, and should be disposed without saving. |
|
|
The problem for me is that my code basically looks like this:
The program hangs on the wrk.SaveChanges(), even if i put a breakpoint at the Data[] data = wrk.Data.ToArray(), it never gets there. It just stays at wrk.SaveChanges, pumping out errors for all eternity :S I have honestly never had a bug like this before, and could use some dire help. |
|
|
We've never seen this either. Can you provide us with a minimal repro project for us to diagnose the problem? Ideally a console application or NUnit test containing just the entity you are trying to save. You can attach a zip file to a forum post using the "Upload a file" button below the preview area. |
|