PIbd-24 Antonova A.A. LabWork_1 #1
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user