diff --git a/ProjectCompanyFurniture/ProjectCompanyFurniture/Program.cs b/ProjectCompanyFurniture/ProjectCompanyFurniture/Program.cs index 95b14d8..e593abf 100644 --- a/ProjectCompanyFurniture/ProjectCompanyFurniture/Program.cs +++ b/ProjectCompanyFurniture/ProjectCompanyFurniture/Program.cs @@ -1,6 +1,7 @@ using ProjectCompanyFurniture.Repositories; using ProjectCompanyFurniture.Repositories.Implementations; using Unity; +using Unity.Lifetime; namespace ProjectCompanyFurniture { @@ -21,11 +22,11 @@ namespace ProjectCompanyFurniture private static IUnityContainer CreateContainer() { var container = new UnityContainer(); - container.RegisterType(); - container.RegisterType(); - container.RegisterType(); - container.RegisterType(); - container.RegisterType(); + container.RegisterType(new TransientLifetimeManager()); + container.RegisterType(new TransientLifetimeManager()); + container.RegisterType(new TransientLifetimeManager()); + container.RegisterType(new TransientLifetimeManager()); + container.RegisterType(new TransientLifetimeManager()); return container; } }