.net core 依赖注入插件 NetCore.AutoRegisterDi
NetCore.AutoRegisterDi
使用方式
1 builder.Services.RegisterAssemblyPublicNonGenericClasses() 2 .Where(c => c.Name.EndsWith("Service")) 3 .AsPublicImplementedInterfaces(ServiceLifetime.Scoped);
NetCore.AutoRegisterDi
使用方式
1 builder.Services.RegisterAssemblyPublicNonGenericClasses() 2 .Where(c => c.Name.EndsWith("Service")) 3 .AsPublicImplementedInterfaces(ServiceLifetime.Scoped);