public ClientCoreController(IShopRepositoryService shopRepository, IProductRepositoryService productRepository, IBasketRepositoryService basketRepository)
 {
     if (shopRepository == null)
     {
         throw new ArgumentNullException(nameof(shopRepository));
     }
     if (productRepository == null)
     {
         throw new ArgumentNullException(nameof(productRepository));
     }
     if (basketRepository == null)
     {
         throw new ArgumentNullException(nameof(basketRepository));
     }
     _shopRepository    = shopRepository;
     _productRepository = productRepository;
     _basketRepository  = basketRepository;
 }
示例#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;
        }
示例#3
0
 /// <summary>Initializes a new instance of the <see cref="ProductCommandHandler"/> class.</summary>
 /// <param name="ProductRepositoryService">The product repository service.</param>
 public ProductCommandHandler(IProductRepositoryService ProductRepositoryService)
 {
     _productRepositoryService = ProductRepositoryService;
 }
示例#4
0
 /// <summary>Initializes a new instance of the <see cref="ProductController"/> class.
 /// Injected Service and Mediator class</summary>
 /// <param name="Productrepositoryservice">The productrepositoryservice.</param>
 /// <param name="Mediator">The mediator.</param>
 public ProductController(IProductRepositoryService Productrepositoryservice, IMediator Mediator)
 {
     _mediator = Mediator;
     _productRepositoryService = Productrepositoryservice;
 }
示例#5
0
 public ProductRepository(ProductContext context, IProductRepositoryService ProductService) : base(context)
 {
     _productService = ProductService;
 }