示例#1
0
 public ProductController(IProductRepository productRepo, IMetaProductRepository metaProductRepo, IProductService productService, ICanSave saver)
 {
     _productRepo = productRepo;
     _metaProductRepo = metaProductRepo;
     _productService = productService;
     this.saver = saver;
 }
示例#2
0
 public PlacementPresenter(/*IProductService s*/ IProductRepository r, IPlacementView v, PlacementModel m)
 {
     //Service = s;
       Repository = r;
       Model = m;
       View = v;
 }
 public CustomerDiscountViewModelBuilder(ICostCentreRepository costCentreRepository, IProductRepository productRepository, ICustomerDiscountRepository customerDiscountRepository, ICustomerDiscountFactory customerDiscountFactory)
 {
     _costCentreRepository = costCentreRepository;
     _productRepository = productRepository;
     _customerDiscountRepository = customerDiscountRepository;
     _customerDiscountFactory = customerDiscountFactory;
 }
        public ProductService(
                            IProductRepository productRepository,
                            ICacheStorage cacheStorage,
                            IConfigurationRepository configurationRepository,
                            ILoggingService loggingService)
        {
            if (productRepository == null)
            {
                throw new ArgumentNullException("ProductRepository");
            }

            if (cacheStorage == null)
            {
                throw new ArgumentNullException("CacheStorage");
            }

            if (configurationRepository == null)
            {
                throw new ArgumentException("Configuration");
            }

            if (loggingService == null)
            {
                throw new ArgumentException("Logging");
            }

            this._productRepository = productRepository;
            this._cacheStorage = cacheStorage;
            this._configurationRepository = configurationRepository;
            this._loggingService = loggingService;
        }
示例#5
0
 public ProductPresenter(IProductView view, IProductRepository repository, IOpenFileDialog openFileDialog)
 {
     this.view = view;
     view.Initialize(this);
     this.repository = repository;
     this.openFileDialog = openFileDialog;
 }
示例#6
0
 public CartController(ICustomerRepository customerRepository,
     IProductRepository productRepository)
     : base(customerRepository)
 {
     _productRepository = productRepository;
     _customerRepository = customerRepository;
 }
示例#7
0
 public HomeController()
 {
     this._repository = new CompanyRepository();
     _productRepository = new ProductRepository();
     _productCompanyRepo = new ProductCompanyRepository();
     _productGroupRepository = new ProductGroupRepository();
 }
 public OrderApplicationService(IOrderRepository orderRepository, IUserRepository userRepository, IProductRepository productRepository, IUnitOfWork unitOfWork)
     : base(unitOfWork)
 {
     this._orderRepository = orderRepository;
     this._userRepository = userRepository;
     this._productRepository = productRepository;
 }
 public LookupService()
 {
     // initialization
     // Replace this with IoC 
     // Can Use TinyIoc, Unity, Ninject, Autofac etc
     productRepository = new ProductRepository();
 }
示例#10
0
 public ProductController(IProductRepository pRepository, IConfigRepository conf, ICategoryRepository cRep, ICategoryRepository catRep)
 {
     _cRep = cRep;
     _pRepository = pRepository;
     _conf = conf;
     _catRep = catRep;
 }
 public BuyerRepositoryService()
 {
     IoCManagerCore.Start();
     _buyerRepository = IoCManagerCore.Kernel.Get<IBuyerRepository>();
     _productRepository = IoCManagerCore.Kernel.Get<IProductRepository>();
     _wrapper = new WrapperBuyer();
 }
 public ProductController(IProductRepository productRepository, ICategoryRepository categoryRepository, 
     ICategoryPresenter categoryPresenter)
 {
     _productRepository = productRepository;
     _categoryRepository = categoryRepository;
     _categoryPresenter = categoryPresenter;
 }
示例#13
0
 //El constructor va a pedir que le pasen el producto
 public CartController(
     IProductRepository productRepository,
     IOrderProcessor orderProcessor)
 {
     _productRepository = productRepository;
     _orderProcessor = orderProcessor;
 }
示例#14
0
        public ProductController(IProductDataService productDataService, 
            IBrandDataService brandDataService,
            IOrderRepository orderRepo,
            IOrderItemRepository orderItemRepo,
            IOrderLogRepository orderLogRepo,
            IProductRepository productRepo,
            IFavoriteRepository favoriteRepo,
            IPromotionRepository promotionRepo,
            IOrder2ExRepository orderexRepo,
            IRMA2ExRepository rmaexRepo,
           IInventoryRepository inventoryRepo)
        {
            _productDataService = productDataService;
            _passHelper = new PassHelper(brandDataService);
            _orderRepo = orderRepo;
            _orderItemRepo = orderItemRepo;
            _orderLogRepo = orderLogRepo;
            _productRepo = productRepo;
            _favoriteRepo = favoriteRepo;
            _promotionRepo = promotionRepo;
            _orderexRepo = orderexRepo;
            _rmaexRepo = rmaexRepo;
            _inventoryRepo = inventoryRepo;

        }
 public AddInvoiceLineItemCommandHandler(IInvoiceRepository documentRepository, IProductRepository productRepository, CokeDataContext cokeDataContext) 
     : base(cokeDataContext)
 {
     _cokeDataContext = cokeDataContext;
     _documentRepository = documentRepository;
     _productRepository = productRepository;
 }
示例#16
0
 public ProductsController()
 {
     _unitOfWork = new UnitOfWork(new ProjectContext());
     _productRepository = _unitOfWork.Products;
     _categoryRepository = _unitOfWork.Categories;
     _authRepository = _unitOfWork.Users;
 }
 public CartServiceTests()
 {
     factory = Substitute.For<ICartFactory>();
     cartRepository = Substitute.For<ICartRepository>();
     productRepository = Substitute.For<IProductRepository>();
     sut = new CartService(cartRepository, productRepository, factory);
 }
 //IReturnablesRepository _returnablesRepository;
 public ProductViewModelBuilder( IProductRepository productRepository,
                                 IProductFactory productFactory,
                                 IProductPackagingRepository productPackagingRepository, 
                                 IProductPackagingTypeRepository productPackagingTypeRepository,
                                 IProductBrandRepository productBrandRepository,
                                 IProductTypeRepository productTypeRepository,
                                 IProductFlavourRepository productFlavourFactory,
     IProductPricingTierRepository productPricingTier,
     IProductPricingFactory productPricingFactory,
 IProductPricingRepository productPricingRepository,
     IVATClassRepository vatClassRepository,
     IAuditLogRepository auditLogRepository
     //IReturnablesRepository returnablesRepository
     )
 {
     _productRepository = productRepository;
     _productFactory = productFactory;
     _productBrandRepository = productBrandRepository;
     _productPackagingRepository = productPackagingRepository;
     _productPackagingTypeRepository = productPackagingTypeRepository;
     _productTypeRepository = productTypeRepository;
     _productFlavourRepository = productFlavourFactory;
     _productPricingFactory = productPricingFactory;
     _productPricingRepository = productPricingRepository;
     _productPricingTier = productPricingTier;
     _vatClassRepository = vatClassRepository;
     _auditLogRepository = auditLogRepository;
     //_returnablesRepository = returnablesRepository;
 }
示例#19
0
 public ProductController(IBrandRepository brandRepository, ITagRepository tagRepository, IProductRepository productRepository, IStoreRepository storeRepository)
 {
     _productRepository = productRepository;
     _storeRepository = storeRepository;
     _brandRepository = brandRepository;
     _tagRepository = tagRepository;
 }
示例#20
0
 public PointOfSale(IProductRepository productRepository)
 {
     this.ProductRepository = productRepository;
     LCDisplayDevice = new LCDDisplayDevice();
     Products = new List<Product>();
     Printer = new Printer();
 }
 public ProductDiscountGroupImporterService(IProductDiscountGroupRepository productDiscountGroupRepository, CokeDataContext context, IDiscountGroupRepository discountGroupRepository, IProductRepository productRepository)
 {
     _productDiscountGroupRepository = productDiscountGroupRepository;
     _context = context;
     _discountGroupRepository = discountGroupRepository;
     _productRepository = productRepository;
 }
示例#22
0
 public ProductController(IProductRepository productRepo,
                         ICategoryRepository categoryRepo)
 {
     _categoryRepo = categoryRepo;
     _productRepo = productRepo;
     PageSize = 5;
 }
        public void AoAcessarACamadaDeAcessoADadosParaSalvarUmLivro_DeveSalvarOLivroERetornarVerdadeiro()
        {
            var novoLivro = new Product
            {
                Name = "Torre Negra",
                Author = "Stephen King",
                Publishing = "Universal",
                Year = 1995,
                Category = Categories.LiteraturaEstrangeira,
                Stock = 5,
                Price = 150.0M,
                Photo = ""
            };

            var auxContext = new LivrariaTDDContext();

            var mockContext = new LivrariaTDDContext();

            _repository = new ProdutoRepository(mockContext);

            var countAntes = auxContext.Products.Count();

            var result = _repository.SalvarLivro(novoLivro);

            var countDepois = auxContext.Products.Count();

            Assert.NotNull(result);
            Assert.AreEqual(0,countAntes);
            Assert.AreEqual(1,countDepois);
        }
示例#24
0
        public EcommerceService(IOrderCoordinator orderCoordinator, IProductRepository productRepository,
            IVoucherRepository voucherRepository, IContactService contactService,
            IBespokePricingHandlerFactory bespokePricingHandlerFactory)
        {
            if (orderCoordinator == null)
            {
                throw new ArgumentNullException("orderCoordinator");
            }
            _orderCoordinator = orderCoordinator;
            if (productRepository == null)
            {
                throw new ArgumentNullException("productRepository");
            }
            _productRepository = productRepository;
            if (voucherRepository == null)
            {
                throw new ArgumentNullException("voucherRepository");
            }
            _voucherRepository = voucherRepository;
            if (contactService == null) throw new ArgumentNullException("contactService");
            _contactService = contactService;

            if (bespokePricingHandlerFactory == null)
            {
                throw new ArgumentNullException("bespokePricingHandlerFactory");
            }
            _bespokePricingHandlerFactory = bespokePricingHandlerFactory;
        }
        public ProductDetailsPresenter(IProductDetailsView view, IProductRepository productRepository,
		                               IEntityViewModelMapper entityViewModelMapper)
        {
            _view = view;
            _productRepository = productRepository;
            _entityViewModelMapper = entityViewModelMapper;
        }
 public ProductTypeRepositoryService()
 {
     IoCManagerCore.Start();
      wrapperTypeProduct = new WrapperProductType();
     _productRepository = IoCManagerCore.Kernel.Get<IProductRepository>();
     _productTypeRepository = IoCManagerCore.Kernel.Get<IProductTypeRepository>();
 }
示例#27
0
 public SearchController(ISubcategoryProductRepository subcategoryProductRepository, IProductRepository productRepository, 
     ProductFilterViewModel productFilterViewModel)
 {
     this.subcategoryProductRepository = subcategoryProductRepository;
     this.productRepository = productRepository;
     this.productFilterViewModel = productFilterViewModel;
 }
 public HomeController(ICategoryRepository categoryRepository, IProductRepository productRepository,
     IConstants constants)
 {
     _categoryRepository = categoryRepository;
     _productRepository = productRepository;
     _constants = constants;
 }
        public ProductCatalogService(IProductTitleRepository productTitleRepository, IProductRepository productRepository,
			ICategoryRepository categoryRepository)
        {
            _productTitleRepository = productTitleRepository;
            _productRepository = productRepository;
            _categoryRepository = categoryRepository;
        }
 public BrandController()
 {
     _brandTypeRepository = new BrandTypeRepository();
     _brandSubTypeRepository = new BrandSubTypeRepository();
     _brandRepository = new BrandRepository();
     _productRepository = new ProductRepository();
 }
 public MobilePropertiesController(StoreWebsiteContext context, IProductRepository products)
 {
     _context  = context;
     _products = products;
 }
示例#32
0
 public ProductController(IProductRepository repository)
 {
     _repository = repository;
 }
 public CatalogController(IProductRepository repository, ILogger <CatalogController> logger)
 {
     _repository = repository ?? throw new ArgumentNullException(nameof(repository));
     _logger     = logger ?? throw new ArgumentNullException(nameof(logger));
 }
示例#34
0
 public HomeController(IProductRepository pr)
 {
     productRepository = pr;
 }
 public MockProductService(IProductRepository productRepository)
 {
     this.productRepository = productRepository;
 }
示例#36
0
 public CartController(IProductRepository repository, IOrderProcessor orderProcessor, IUserRepository userRepository)
 {
     _repository     = repository;
     _orderProcessor = orderProcessor;
     _userRepository = userRepository;
 }
示例#37
0
 public CartController(IProductRepository repo, IOrderProcessor proc)
 {
     repository     = repo;
     orderProcessor = proc;
 }
 public AutoOrderProductMaintenanceService(IWarehouseFactory warehouseFactory, IProductRepository productRepository, IDeliveryRepository deliveryRepository)
 {
     _warehouseFactory   = warehouseFactory;
     _productRepository  = productRepository;
     _deliveryRepository = deliveryRepository;
 }
示例#39
0
 public ElasticSearchPopulator(IProductRepository productRepository)
 {
     this.productRepository = productRepository;
 }
示例#40
0
        //  private ILogger _logger;

        public ProductsController(IProductRepository repository)
        {
            _repository = repository;
            //_logger = logger;
        }
示例#41
0
 public ProductController(IProductRepository repository) => this.repository = repository;
示例#42
0
 public ProductsController(IProductService productService, IProductRepository productRepository, IMapper mapper)
 {
     _productService = productService;
     _productRepository = productRepository;
     _mapper = mapper;
 }
示例#43
0
 public ProductService(IProductRepository repository)
     : base(repository)
 {
     _repository = repository;
 }
示例#44
0
 public CreateNewProductHandlerTest()
 {
     productRepository = new ProductRepository();
 }
示例#45
0
 public ProductService(IProductRepository ProductRepository, IUnitOfWork unitOfWork)
 {
     this.ProductRepository = ProductRepository;
     this.unitOfWork        = unitOfWork;
 }
示例#46
0
 public OrderController(IOrderRepository orderRepository, IUnitOfWork unitOfWork, IProductRepository productRepository, IOrderLineItemRepository orderLineItemRepository
                        )
 {
     _orderRepository         = orderRepository;
     _unitOfWork              = unitOfWork;
     _productRepository       = productRepository;
     _orderLineItemRepository = orderLineItemRepository;
 }
示例#47
0
 public ProductController(IProductRepository productRepository)
 {
     this.repository = productRepository;
 }
 public OrdersController(IOrderRepository orderRepository, IProductRepository productRepository)
 {
     _orderRepository   = orderRepository;
     _productRepository = productRepository;
 }
 public CartController(IProductRepository repoParam, IOrderProcessor process)
 {
     repository     = repoParam;
     orderProcessor = process;
 }
示例#50
0
 public ProductBusiness(IProductRepository productRepository)
 {
     _productRepository = productRepository;
 }
示例#51
0
 public HomeController(IProductRepository productRepository)
 {
     this.productRepository = productRepository;
 }
示例#52
0
 public ProductStorer(IProductRepository productRepository)
 {
     this.productRepository = productRepository;
 }
示例#53
0
 public ProductController(IMapper mapper, IProductRepository productRepository)
 {
     _mapper            = mapper;
     _productRepository = productRepository;
 }
 public CartController(IProductRepository repo, Cart cartService)
 {
     repository = repo;
     cart       = cartService;
 }
示例#55
0
 public ProductService(IProductRepository productRepository)
 {
     _productRepository = productRepository;
 }
示例#56
0
        public EFUnitOfWork(ICategoryRepository categoryRepository,
                            IPhotoRepository photoRepository,
                            IProductRepository productRepository,
                            IProductTypeRepository productTypeRepository, IOrderRepository orderRepository, IComentRepository comentRepository,
                            IShopCartRepository shopCartRepository, Context context)
        {
            CategoryRepository    = categoryRepository;
            PhotoRepository       = photoRepository;
            ProductRepository     = productRepository;
            ProductTypeRepository = productTypeRepository;
            OrderRepository       = orderRepository;
            ComentRepository      = comentRepository;
            ShopCartRepository    = shopCartRepository;
            _context = context;

            var categories = new List <Category>()
            {
                new Category {
                    Id = 1, Name = "Футболки"
                },
                new Category {
                    Id = 2, Name = "Куртки"
                },
                new Category {
                    Id = 3, Name = "Брюки"
                }
            };
            var photo = new List <Photo>
            {
                new Photo()
                {
                    Id = 1, Url = "https://images.satu.kz/46090190_futbolki-muzhskie.jpg", Alt = "Футболка"
                }, new Photo()
                {
                    Id = 2, Url = "https://images.satu.kz/46090190_futbolki-muzhskie.jpg", Alt = "Футболка"
                }
            };
            var photosTypes = new List <ProductType>()
            {
                new ProductType()
                {
                    Id = 1, Size = "Xl"
                },
                new ProductType()
                {
                    Id = 2, Size = "X"
                },
                new ProductType()
                {
                    Id = 3, Size = "L"
                }
            };
            var products = new List <Product>()
            {
                new Product
                {
                    Id           = 1,
                    Name         = "Обычная футболка", Category = categories[0], Count = 50,
                    Description  = "Обычные футболки для всех", Price = 500,
                    Photos       = photo,
                    ProductTypes = photosTypes
                },
                new Product
                {
                    Id           = 2,
                    Name         = "НеОбычная футболка", Category = categories[0], Count = 50,
                    Description  = "НеОбычные футболки для всех", Price = 500,
                    Photos       = photo,
                    ProductTypes = photosTypes
                },
                new Product
                {
                    Id           = 3,
                    Name         = "Обычная куртка", Category = categories[1], Count = 50, Description = "Обычные куртки для всех", Price = 500,
                    Photos       = photo,
                    ProductTypes = photosTypes
                },
                new Product
                {
                    Id           = 4,
                    Name         = "Необычная куртка", Category = categories[1], Count = 50, Description = "необычная куртка для всех", Price = 500,
                    Photos       = photo,
                    ProductTypes = photosTypes
                },
                new Product
                {
                    Id           = 5,
                    Name         = "Обычный брюк", Category = categories[2], Count = 50,
                    Description  = "Обычные брюки для всех", Price = 500,
                    Photos       = photo,
                    ProductTypes = photosTypes
                },
                new Product
                {
                    Id           = 6,
                    Name         = "Необынчый брюк", Category = categories[2], Count = 50,
                    Description  = "неОбычные брюки для всех", Price = 500,
                    Photos       = photo,
                    ProductTypes = photosTypes
                }
            };
            //  _context.Users.AddRange(_people);
            // _context.Products.AddRange(products);
            //      _context.SaveChanges();
        }
示例#57
0
 public ProductController(IProductRepository repo)
 {
     this.repo = repo;
 }
示例#58
0
 public ProductDataController(IProductRepository productRepository)
 {
     _productRepository = productRepository;
 }
示例#59
0
 public CartController(IProductRepository productRepository, UserManager<User> userManager, IOrderRepository orderRepository)
 {
     _productRepository = productRepository;
     _userManager = userManager;
     _orderRepository = orderRepository;
 }
示例#60
0
 public ProductServiceImp(IProductRepository productRepository, ICategoryRepository categoryRepository)
 {
     _categoryRepository = categoryRepository;
     _productRepository  = productRepository;
 }