I'm calling DbContext.SaveChangesAsync()
to save my objects to the database. This takes about 120 ms.
If an event changes an tracked object's property during this time, this change is neither directly saved to database nor tracked by the EF Core ChangeTracker to save it later.
That means, that if I call DbContext.SaveChangesAsync()
later again, the new property value is still not saved to the database because the EF Core ChangeTracking doesn't see this change.
I was expecting that DbContext.SaveChangesAsync()
can't save changes to the database that are made during the operation. But I was expecting that the EF Core ChangeTracker would track this change correctly to make it possible to later save it to the database.