Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 autofac 在 asp.net mvc 4 中设置 ModelBinders.Binders.DefaultBinder=new SmartBinder(),这样做的正确方法是什么?
在您的 Global.asax.cs 中;
protected void Application_Start() { System.Web.Mvc.ModelBinders.Binders.DefaultBinder = new SmartBinder(); }
Autofac 不需要这样做。