wanshenmean
4 天以前 64a2aa2301946f777659239247233e47ad1e3076
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseRepository/UnitOfWorks/UnitOfWorkManage.cs
@@ -1,13 +1,7 @@
using Microsoft.Extensions.Logging;
using SqlSugar;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using WIDESEAWCS_Core.Helper;
namespace WIDESEAWCS_Core.BaseRepository
@@ -16,13 +10,16 @@
    {
        // 定义日志记录器
        private readonly ILogger<UnitOfWorkManage> _logger;
        // 定义SqlSugarClient
        private readonly ISqlSugarClient _sqlSugarClient;
        // 定义事务计数器
        private int _tranCount { get; set; }
        // 定义事务计数器的只读属性
        public int TranCount => _tranCount;
        // 定义事务栈
        public readonly ConcurrentStack<string> TranStack = new();
@@ -43,7 +40,6 @@
            // 必须要as,后边会用到切换数据库操作
            return _sqlSugarClient as SqlSugarClient;
        }
        // 创建UnitOfWork
        public UnitOfWork CreateUnitOfWork()
@@ -141,7 +137,6 @@
                {
                    spinner.SpinOnce();
                }
                if (result == method.GetFullName())
                {