Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
 public CatalogService(RequestContext c,
     CategoryRepository categories,
     CategoryProductAssociationRepository crosses,
     ProductRepository products,
     ProductRelationshipRepository relationships,
     ProductImageRepository productImages,
     ProductReviewRepository productReviews,
     VariantRepository productVariants,
     OptionRepository productOptions,
     ProductOptionAssociationRepository productsXOptions,
     ProductFileRepository productFiles,
     ProductVolumeDiscountRepository volumeDiscounts,
     ProductPropertyValueRepository propertyValues,
     ProductInventoryRepository inventory,
     ProductTypeRepository types,
     ProductTypePropertyAssociationRepository typesXProperties,
     ProductPropertyRepository properties,
     WishListItemRepository wishItems)
 {
     context = c;
     Categories = categories;
     CategoriesXProducts = crosses;
     ProductRelationships = relationships;
     this.Products = products;
     this.ProductImages = productImages;
     this.ProductReviews = productReviews;
     this.ProductVariants = productVariants;
     this.ProductOptions = productOptions;
     this.ProductsXOptions = productsXOptions;
     this.ProductFiles = productFiles;
     this.VolumeDiscounts = volumeDiscounts;
     this.ProductPropertyValues = propertyValues;
     this.ProductInventories = inventory;
     this.ProductTypes = types;
     this.ProductTypesXProperties = typesXProperties;
     this.ProductProperties = properties;
     this.WishListItems = wishItems;
 }
 public WrapperProductType()
 {
     IoCManagerCore.Start();
     _productTypeRepository = (ProductTypeRepository) IoCManagerCore.Kernel.Get<IProductTypeRepository>();
     CollectionProductTypes = (List<ProductType>)_productTypeRepository.GetAll();
 }