When I try to update the identifier from two parallel threads, I get and IdentityResultthat contains this error message:Optimistic concurrency failure, object has been modified.
I want to update the model and try again. Something like that.
var result = await UserManager.AddClaimAsync(memberIdentity, new Claim("abc", "cde"));
if(!result.Succeeded)
{
await UserManager.AddClaimAsync(memberIdentity, new Claim("abc", "cde"));
}
Any ideas on how I will reload the identity or context?
source
share