例子:
using (var connection = GetOpenConnection())using (var transaction = connection.BeginTransaction()){ connection.Execute( "INSERT INTO data(Foo, Bar) values (@Foo, @Bar);", list, transaction); transaction.Commit();}
本文共 282 字,大约阅读时间需要 1 分钟。
例子:
using (var connection = GetOpenConnection())using (var transaction = connection.BeginTransaction()){ connection.Execute( "INSERT INTO data(Foo, Bar) values (@Foo, @Bar);", list, transaction); transaction.Commit();}
转载于:https://www.cnblogs.com/lunawzh/p/9569356.html