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