Beispiel #1
0
 public UnitOfWork()
 {
     _context = new FxContext();
     Devices = new DeviceRepository(_context);
     Suppliers = new SupplierRepository(_context);
     Categories = new CategoryRepository(_context);
     PointNames = new PointNameRepository(_context);
     Sockets = new SocketRepository(_context);
     ProductTypes = new ProductTypeRepository(_context);
     IncludedProducts = new IncludedProductRepository(_context);
     SignalTypes = new SignalTypeRepository(_context);
     CableTypes = new CableTypeRepository(_context);
 }
Beispiel #2
0
 public UnitOfWork(FxContext context)
 {
     _context = context;
     // client of unitOfWork uses same context on all properties
     Devices = new DeviceRepository(_context);
     Suppliers = new SupplierRepository(_context);
     Categories = new CategoryRepository(_context);
     PointNames = new PointNameRepository(_context);
     Sockets = new SocketRepository(_context);
     ProductTypes = new ProductTypeRepository(_context);
     IncludedProducts = new IncludedProductRepository(_context);
     SignalTypes = new SignalTypeRepository(_context);
     CableTypes = new CableTypeRepository(_context);
 }