0
我做我可以使用(var scope = new TransactionScope())和Postgres嗎?
using(var scope = new TransactionScope())
{
//lots of calls to sql server
scope.Complete();
}
,它就像一個交易
我想知道這是否是去工作同樣具有Postgres的?
我做我可以使用(var scope = new TransactionScope())和Postgres嗎?
using(var scope = new TransactionScope())
{
//lots of calls to sql server
scope.Complete();
}
,它就像一個交易
我想知道這是否是去工作同樣具有Postgres的?
TransactionScope
最終導致創建具體的事務對象。在MS SQL的情況下,它是SqlTransaction,在postgres的情況下,它可能是NpgsqlTransaction或您正在使用的任何東西。所以如果你懷疑,你總是可以明確地創建交易並且確定。