.NET7 中Autofac依赖注入整合多层,项目中可直接用

一、配置Autofac替换内置DI 1.安装Nuget包:Autofac.Extensions.DependencyInjection 2.Program.cs中加上 builder.Host.UseServiceProviderFactory(new AutofacServiceProviderF
posted on 2023-06-15 08:52  包子wxl  阅读(1492)  评论(9编辑  收藏  举报