Пример #1
0
 public ProductCategoriesController(IProductCategoryService productCategoryService, IProductCategoryRepositoryService productCategoryRepository)
 {
     if (productCategoryService == null)
     {
         throw new ArgumentNullException(nameof(productCategoryService));
     }
     if (productCategoryRepository == null)
     {
         throw new ArgumentNullException(nameof(productCategoryRepository));
     }
     _productCategoryService    = productCategoryService;
     _productCategoryRepository = productCategoryRepository;
 }
Пример #2
0
        public ShopAdministrationCoreController(IProductCategoryRepositoryService productCategoryRepository, IProductRepositoryService productRepositoryService, IShopRepositoryService shopRepository)
        {
            if (productCategoryRepository == null)
            {
                throw new ArgumentNullException(nameof(productCategoryRepository));
            }
            if (productRepositoryService == null)
            {
                throw new ArgumentNullException(nameof(productRepositoryService));
            }
            if (shopRepository == null)
            {
                throw new ArgumentNullException(nameof(shopRepository));
            }

            _productCategoryRepository = productCategoryRepository;
            _productRepositoryService  = productRepositoryService;
            _shopRepository            = shopRepository;
        }