coderdnewbie

Results 2 issues of coderdnewbie

I have recently found out a better way to do upsert. Use the update method at the Dbcontext level. See the Microsoft docs: https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.update?view=efcore-6.0

I have seen other solutions use the ‘WITH (HOLDLOCK)‘ hint when generating the merge statement. Is this hint missing from your solution? See https://weblogs.sqlteam.com/dang/2009/01/31/upsert-race-condition-with-merge/ Also, do you drop the temporary...