开发者

can I use using(var scope = new TransactionScope()) with Postgres?

I'm doing

using(var scope = new TransactionScope())
{
//lots of calls to sql server
scope.Complete();
}

and it works like a transaction

I would like to know if it is goi开发者_如何学运维ng to work the same with postgres ?


TransactionScope eventually result in creation of concrete transaction object. In case of MS SQL it is SqlTransaction, in case of postgres it might be NpgsqlTransaction or whatever you are using. So if you doubt, you always can create transaction explicitly and be sure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜