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代码的Ninject等效项是什么:
builder.RegisterType<WebWorkContext>().As<IWorkContext>().InstancePerHttpRequest();
基本上我想为应用程序中的特定用户共享一些设置,例如当前工作语言、用户名、货币格式。
绑定到 ninject 内核(例如 in global.asax)
global.asax
kernel.Bind<IWorkContext>().To<WebWorkContext>().InRequestScope();