标签:col provider ons startup register ret ras return gis
ConfigureServices
返回类型改为IServiceProvider
public IServiceProvider ConfigureServices(IServiceCollection services) { services.AddMvc(); 可以将下面代码单独放入到一个文件
var builder = new ContainerBuilder(); builder.Populate(services); builder.RegisterAssemblyTypes(typeof(Startup).Assembly).AsImplementedInterfaces(); var Container = builder.Build(); return new AutofacServiceProvider(Container); }
标签:col provider ons startup register ret ras return gis
原文地址:https://www.cnblogs.com/hack301/p/9632739.html