Why is the _session.FlushAsync(); called when updating a user using UserManager? #17729
Replies: 2 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
As @Piedone mentioned, One important difference between version 2 and version 3 is how commits are handled. In v2, it was possible to read dirty data—that is, data written to the database but not yet committed. For example, if you called In v3, this behavior has changed. By default, reading dirty data is no longer allowed, improving data consistency across concurrent requests. Let me know if this answers your question. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When I implement a code where a User entity is updated and I save it using
_userManager.UpdateAsync()
the whole transaction is committed and even if there's an exception after that, the user entity is saved to the database. I'd expect to commit the transaction at the end of the request as every other items like content items.The related code is here:
OrchardCore/src/OrchardCore/OrchardCore.Users.Core/Services/UserStore.cs
Line 219 in 78373a5
Beta Was this translation helpful? Give feedback.
All reactions