添加工作单元

This commit is contained in:
黎明
2022-12-26 14:19:12 +08:00
parent c964b98240
commit ec06d30d59
15 changed files with 297 additions and 14 deletions

View File

@@ -15,6 +15,7 @@ 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;
@@ -48,7 +49,8 @@ namespace Yi.Framework.WebCore.AutoFacExtend
containerBuilder.RegisterAssemblyTypes(assemblysServices)
.AsImplementedInterfaces()
.InstancePerLifetimeScope()
.EnableInterfaceInterceptors();
.EnableInterfaceInterceptors()
.InterceptedBy(typeof(UnitOfWorkInterceptor));
///反射注册任务调度层
var assemblysJob = GetDll("Yi.Framework.Job.dll");