使用sqlsugar内置工作单元

This commit is contained in:
chenchun
2023-01-02 13:59:05 +08:00
parent 0e78857645
commit ea35871aba
16 changed files with 65 additions and 58 deletions

View File

@@ -15,7 +15,6 @@ using Yi.Framework.Interface;
using Yi.Framework.Job;
using Yi.Framework.Repository;
using Yi.Framework.Service;
using Yi.Framework.Uow.Interceptors;
using Yi.Framework.WebCore.AutoFacExtend;
using Module = Autofac.Module;
@@ -49,9 +48,9 @@ namespace Yi.Framework.WebCore.AutoFacExtend
containerBuilder.RegisterAssemblyTypes(assemblysServices)
.AsImplementedInterfaces()
.InstancePerLifetimeScope()
.EnableInterfaceInterceptors()
.EnableInterfaceInterceptors();
//开启工作单元拦截
.InterceptedBy(typeof(UnitOfWorkInterceptor));
//.InterceptedBy(typeof(UnitOfWorkInterceptor));
///反射注册任务调度层
var assemblysJob = GetDll("Yi.Framework.Job.dll");