79160124

Date: 2024-11-05 17:29:48
Score: 0.5
Natty:
Report link

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.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Mason A