Лабораторная работа №1
This commit is contained in:
parent
b409d201d5
commit
02c015aa69
@ -1,6 +1,7 @@
|
|||||||
using ProjectCompanyFurniture.Repositories;
|
using ProjectCompanyFurniture.Repositories;
|
||||||
using ProjectCompanyFurniture.Repositories.Implementations;
|
using ProjectCompanyFurniture.Repositories.Implementations;
|
||||||
using Unity;
|
using Unity;
|
||||||
|
using Unity.Lifetime;
|
||||||
|
|
||||||
namespace ProjectCompanyFurniture
|
namespace ProjectCompanyFurniture
|
||||||
{
|
{
|
||||||
@ -21,11 +22,11 @@ namespace ProjectCompanyFurniture
|
|||||||
private static IUnityContainer CreateContainer()
|
private static IUnityContainer CreateContainer()
|
||||||
{
|
{
|
||||||
var container = new UnityContainer();
|
var container = new UnityContainer();
|
||||||
container.RegisterType<IClientRepository, ClientRepository>();
|
container.RegisterType<IClientRepository, ClientRepository>(new TransientLifetimeManager());
|
||||||
container.RegisterType<IInvoiceRepository, InvoiceRepository>();
|
container.RegisterType<IInvoiceRepository, InvoiceRepository>(new TransientLifetimeManager());
|
||||||
container.RegisterType<IManufacturerRepository, ManufacturerRepository>();
|
container.RegisterType<IManufacturerRepository, ManufacturerRepository>(new TransientLifetimeManager());
|
||||||
container.RegisterType<IProductMovementRepository, ProductMovementRepository>();
|
container.RegisterType<IProductMovementRepository, ProductMovementRepository>(new TransientLifetimeManager());
|
||||||
container.RegisterType<IProductRepository, ProductRepository>();
|
container.RegisterType<IProductRepository, ProductRepository>(new TransientLifetimeManager());
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user