using (DistributedTransaction tran = new DistributedTransaction())
{
IDbConnection _connection;
using (_connection = Utilities.GetOpenConnection())
{
var s= _connection.ExecuteScalar("select user()");
Console.WriteLine(s);
}
IDbConnection _connection2;
using (_connection2 = Utilities.GetOpenConnection())
{
var s = _connection2.ExecuteScalar("select user()");
Console.WriteLine(s);
}
tran.Complete();
}
不是分布式
MSDTC 关闭也可用