May 2010
Intermediate to advanced
1272 pages
61h 18m
English
Of course, the ADO.NET Entity Framework provides the ability to handle optimistic concurrency exceptions. Basically you need to intercept eventual System.Data.OptimisticConcurrencyException instances. When intercepted, you need to invoke the ObjectContext.Refresh method that allows solving the concurrency problem. The following code revisits the AddProduct custom method described in the “Adding Entities” subsection:

If an OptmisticConcurrencyException is thrown, first you need to invoke the ObjectContext.Refresh mode that is responsible for solving concurrency problems. It receives two arguments: The first one is ...
Read now
Unlock full access