Beispiel #1
0
 public static void RegisterDependencies(IUnityContainer container)
 {
     container.RegisterFactory <ApplicationUserManager>(
         () => container.Resolve <HttpContextBase>().GetOwinContext().GetUserManager <ApplicationUserManager>(),
         UnityConfig.PerRequestLifetimeManager())
     .RegisterFactory <ApplicationSignInManager>(
         () => container.Resolve <HttpContextBase>().GetOwinContext().Get <ApplicationSignInManager>(),
         UnityConfig.PerRequestLifetimeManager())
     .RegisterFactory(
         () => container.Resolve <HttpContextBase>().GetOwinContext().Authentication,
         UnityConfig.PerRequestLifetimeManager());
 }