https://learn.microsoft.com/en-us/dotnet/api/system.data.entity.infrastructure.dbupdateconcurrencyexception?view=entity-framework-6.2.0 The above documentation states: "Exception thrown by DbContext when it was expected that SaveChanges for an entity would result in a database update but in fact no rows in the database were affected. This usually indicates that the database has been concurrently updated such that a concurrency token that was expected to match did not actually match."
Entity Framework contexts are not thread safe. Seeing as the above is running in a task, I would make sure the actual EF Core operations are happening in a thread safe manner.