Example #1
0
        public ProductController()
        {
            _mainProductRepository = new MainProductRepository();
            _productRepository     = new ProductRepository();

            _productService = new ProductService(_mainProductRepository, _productRepository);
        }
Example #2
0
 public MainProductService(IMainProductRepository mainProductRepository, IProductRepository productkRepository, bool initialization = true)
 {
     _mainProductRepository = mainProductRepository;
     _productkRepository    = productkRepository;
     if (initialization)
     {
         _mainProductRepository = new MainProductRepository();
         _productkRepository    = new ProductRepository();
     }
 }