在ASP.NET Core2.0中,我在Startup类上使用了ConfigureServices方法来连接Autofac,包装现有的services注册并添加其他注册。ConfigureServices(IServiceCollection services) // Standard service registrations (ex: services.AddMvcbuilder.Build();
return new AutofacServiceProvider(this.Application
我使用以下内容来接受在我的Core应用程序中序列化的XML。services.AddMvc(options => // allow xml format for input}).SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
在更新到ASP.NET Core2.1