private void ConfigureApplication() { PsychoCareContextInitializer.Initialize(); ContainerHolder.RegisterCommonDependencies(); ContainerHolder.Container.Register <IWebPrincipal, WebPrincipal>(Lifestyle.Scoped); ContainerHolder.Container.Verify(); }
public static void RegisterBaseDependencies() { ResetConatiner(); ContainerHolder.RegisterCommonDependencies(); Container.Options.AllowOverridingRegistrations = true; var contextBuilderMock = new Mock <IDbContextBuilder>(); contextBuilderMock.Setup(x => x.GetContext()) .Returns(() => new TestPsychoCareContext()); ContainerHolder.Container.Register(typeof(IDbContextBuilder), () => contextBuilderMock.Object, Lifestyle.Transient); }