You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On our application we added optimistic concurrency using the [ConcurrencyCheck] annotation on our model classes. It is working fine, but there are some very specific cases where we would like to force an update without doing concurrency checking (yes, we know the risks).
We would like a built-in solution on EF Core DbContext that ignores concurrency checking for some entities when calling SaveChanges. Something like:
_context.IgnoreConcurrencyChecking(entity);
_context.SaveChanges();
//No DbConcurrencyException just a forced updated
Thanks.
The text was updated successfully, but these errors were encountered:
An opt-in would also be nice: the ability for a specific save operation to specify optimistic concurrency for some set of fields that are not otherwise declared for optimistic concurrency on the model.
roji
changed the title
Add option to ignore concurrency checking for some entities
Add option to disable concurrency checking at the SaveChanges level
Oct 7, 2022
On our application we added optimistic concurrency using the [ConcurrencyCheck] annotation on our model classes. It is working fine, but there are some very specific cases where we would like to force an update without doing concurrency checking (yes, we know the risks).
We would like a built-in solution on EF Core DbContext that ignores concurrency checking for some entities when calling SaveChanges. Something like:
_context.IgnoreConcurrencyChecking(entity);
_context.SaveChanges();
//No DbConcurrencyException just a forced updated
Thanks.
The text was updated successfully, but these errors were encountered: