提交 379c9a59 编写于 作者: s0611163's avatar s0611163

v1.8.29 接口无变化,仅优化

上级 5b532cce
......@@ -5,9 +5,9 @@
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<AssemblyVersion>1.8.28</AssemblyVersion>
<FileVersion>1.8.28</FileVersion>
<Version>1.8.28</Version>
<AssemblyVersion>1.8.29</AssemblyVersion>
<FileVersion>1.8.29</FileVersion>
<Version>1.8.29</Version>
</PropertyGroup>
<ItemGroup>
......
......@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Dapper.LiteSql</id>
<version>1.8.28</version>
<version>1.8.29</version>
<title>Dapper.LiteSql</title>
<authors>suxiang</authors>
<owners></owners>
......@@ -10,7 +10,7 @@
<license type="expression">MIT</license>
<projectUrl>https://github.com/0611163/Dapper.LiteSql</projectUrl>
<description>一款同时支持原生SQL和Lambda表达式的轻量级ORM,支持Oracle、MSSQL、MySQL、PostgreSQL、SQLite、Access数据库,以及任意ADO.NET支持的数据库。</description>
<releaseNotes>修复BUG:数据库事务回滚后,没有关闭数据库连接。</releaseNotes>
<releaseNotes>接口无变化 ,仅优化</releaseNotes>
<copyright>Copyright @ 2022</copyright>
<dependencies>
<group targetFramework=".NETFramework4.6.1">
......
......@@ -15,7 +15,17 @@ namespace Dapper.LiteSql
public DbTransactionExt BeginTransaction()
{
_conn = _connFactory.GetConnection(null);
_tran = new DbTransactionExt(_conn.Conn.BeginTransaction(), _conn);
try
{
_tran = new DbTransactionExt(_conn.Conn.BeginTransaction(), _conn);
}
catch
{
_conn.Tran = null;
_connFactory.Release(_conn);
_tran = null;
throw;
}
return _tran;
}
#endregion
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册