I am trying to replicate the following Ninject syntax in Unity, but with no luck:
Bind<IIdentity>().ToMethod(c => HttpContext.Current.User.Identity);
I think it should look something like this:
IUnityContainer container; ... container.RegisterType<IIdentity>(HttpContext.Current.User.Identity);
How should it be?
source share