v1.1.0-preview3

This commit is contained in:
28810
2020-01-09 18:21:29 +08:00
parent 6eb720d2ae
commit 90101e2d22
20 changed files with 40 additions and 27 deletions

View File

@ -11,7 +11,7 @@ namespace FreeSql
{
public class UnitOfWork : IUnitOfWork
{
#if ns20
#if netcoreapp
public static readonly AsyncLocal<IUnitOfWork> Current = new AsyncLocal<IUnitOfWork>();
#endif
@ -35,7 +35,7 @@ namespace FreeSql
public UnitOfWork(IFreeSql fsql)
{
_fsql = fsql;
#if ns20
#if netcoreapp
Current.Value = this;
#endif
}
@ -48,7 +48,7 @@ namespace FreeSql
_fsql.Ado.MasterPool.Return(_conn);
_tran = null;
_conn = null;
#if ns20
#if netcoreapp
Current.Value = null;
#endif
EntityChangeReport?.Report.Clear();