C# 我可以在Postgres中使用(var scope=newTransactionScope())吗?
我在做什么C# 我可以在Postgres中使用(var scope=newTransactionScope())吗?,c#,.net,postgresql,transactions,C#,.net,Postgresql,Transactions,我在做什么 using(var scope = new TransactionScope()) { //lots of calls to sql server scope.Complete(); } 它就像一个交易 我想知道它是否也适用于postgres?TransactionScope最终会创建具体的事务对象。对于MS SQL,它是,对于postgres,它可能是,或者您正在使用的任何东西。所以,如果您怀疑,您总是可以显式地创建事务并确保
using(var scope = new TransactionScope())
{
//lots of calls to sql server
scope.Complete();
}
它就像一个交易
我想知道它是否也适用于postgres?
TransactionScope
最终会创建具体的事务对象。对于MS SQL,它是,对于postgres,它可能是,或者您正在使用的任何东西。所以,如果您怀疑,您总是可以显式地创建事务并确保