我有现有的项目,它使用 AutoFac 作为 IoC。
在注册码中,我有以下几行:
var resolver = builder.Build();
DependencyResolver.SetResolver(new AutofacDependencyResolver(resolver));
config.DependencyResolver = new AutofacWebApiDependencyResolver(resolver);
DependencyResolver.SetResolver
所以我的问题是和有什么区别HttpConfiguration.DependecyResolver
?为什么我要同时分配它们?