hutongqing
2024-12-10 8d341db9d2d5699d527c88c935f0c4ce255a57a4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs
@@ -1,5 +1,6 @@
锘縰sing Autofac;
using Autofac.Extras.DynamicProxy;
using HslCommunication.WebSocket;
using Microsoft.Extensions.DependencyModel;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using System;
@@ -25,8 +26,11 @@
            var cacheType = new List<Type>();
            builder.RegisterType<LogAOP>();
            cacheType.Add(typeof(LogAOP));
            if (AppSettings.Get("LogAopEnable").ObjToBool())
            {
                cacheType.Add(typeof(LogAOP));
            }
            builder.RegisterGeneric(typeof(RepositoryBase<>)).As(typeof(IRepository<>)).InstancePerDependency();//娉ㄥ唽浠撳偍
            builder.RegisterGeneric(typeof(ServiceBase<,>)).As(typeof(IService<>)).InstancePerDependency();//娉ㄥ唽鏈嶅姟
@@ -68,6 +72,7 @@
               .AsImplementedInterfaces()
               .InstancePerLifetimeScope()
               .PropertiesAutowired();
        }
    }
}