1 year ago

#335798

test-img

shk001

EF Core- his SqlTransaction has completed; it is no longer usable. at Microsoft.Data.SqlClient.SqlTransaction.ZombieCheck()

We are using EF Core with repository pattern in our application.

But we are facing an issue randomly anytime ,however frequency of the issue not very high but still after 300 to 400 request it popups any time.

Savechangesasync() is throwing below error,but not reproducing when we retry same requests

System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.
at Microsoft.Data.SqlClient.SqlTransaction.ZombieCheck()
at Microsoft.Data.SqlClient.SqlTransaction.Commit() at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.Commit()

Any best practices to solve it would be helpful.

entity-framework-core

transactionscope

0 Answers

Your Answer

Accepted video resources