PIbd-24 Antonova A.A. LabWork_1 #1

Open
Anitonchik wants to merge 7 commits from LabWork_1 into main
Showing only changes of commit 02c015aa69 - Show all commits

View File

@ -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<IClientRepository, ClientRepository>();
container.RegisterType<IInvoiceRepository, InvoiceRepository>();
container.RegisterType<IManufacturerRepository, ManufacturerRepository>();
container.RegisterType<IProductMovementRepository, ProductMovementRepository>();
container.RegisterType<IProductRepository, ProductRepository>();
container.RegisterType<IClientRepository, ClientRepository>(new TransientLifetimeManager());
container.RegisterType<IInvoiceRepository, InvoiceRepository>(new TransientLifetimeManager());
container.RegisterType<IManufacturerRepository, ManufacturerRepository>(new TransientLifetimeManager());
container.RegisterType<IProductMovementRepository, ProductMovementRepository>(new TransientLifetimeManager());
container.RegisterType<IProductRepository, ProductRepository>(new TransientLifetimeManager());
return container;
}
}