Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/270.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 我可以在Postgres中使用(var scope=newTransactionScope())吗?_C#_.net_Postgresql_Transactions - Fatal编程技术网

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,它可能是,或者您正在使用的任何东西。所以,如果您怀疑,您总是可以显式地创建事务并确保