Tag: optimistic concurrency

entity framework中的并发exception

在Entity Framework(CF,C#)中调用SaveChanges / SaveChangesAsync时,如果发生更改冲突(例如,自上次读取之后值已更新),那么我应该捕获这两个exception中的DbUpdateConcurrencyException或OptimisticConcurrencyException ? 它们之间有什么区别?