Closed GZTimeWalker closed 1 year ago
When every request comes in, I will update the LastVisitedUTC for user, and save to database.
LastVisitedUTC
user.LastVisitedUTC = DateTimeOffset.UtcNow; await userManager.UpdateAsync(user);
With a higher version of EFCore and Identity, these changes that need to be updated will be cached, and save to database later.
But these caches, produced in a short time, have different ConcurrencyStamp, and EFCore will throw a DbUpdateConcurrencyException.
ConcurrencyStamp
How can I reach the purpose properly?
When every request comes in, I will update the
LastVisitedUTC
for user, and save to database.With a higher version of EFCore and Identity, these changes that need to be updated will be cached, and save to database later.
But these caches, produced in a short time, have different
ConcurrencyStamp
, and EFCore will throw a DbUpdateConcurrencyException.How can I reach the purpose properly?