我们真的需要 C# 中的事务处理以及双方的数据库存储过程吗?
C#:
Using(transaction with transaction scope)
{
Execute stored proc;
Transaction. Complete;
}
Run Code Online (Sandbox Code Playgroud)
SQL存储过程:
Create process
As
Begin try
Begin transaction
Commit
End try
Begin catch
Rollback
End catch
Run Code Online (Sandbox Code Playgroud)