Hi DavidCraig-4984,
According to your description, maybe your context is being shared by multiple requests which means that the entity you're editing has been tracked already.
You can try to detach an object that has been attached to the context via setting the state to Detached.
Code likes below:
Context.Entry(entity).State = EntityState.Detached
If you want to load entities from the database without fully attaching them to the context (without change tracking), you can use AsNoTracking as JaliyaUdagedara saide.
Here are some similar threads you can refer to.
The instance of entity type cannot be tracked because another instance with the same key value for {'Id'} is already being tracked
instance of entity type cannot be tracked because another instance with same key value is tracked
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.