public CategoriesController(IArticleRepositoryAsync articleRepository, IPriceListRepositoryAsync articlePriceRepository, IShopSignRepositoryAsync shopSignRepository, IUserRepositoryAsync userRepository) { _articleRepository = (ArticleCacheRepositoryAsync)articleRepository ?? throw new ArgumentNullException(nameof(articleRepository)); _articlePriceRepository = articlePriceRepository ?? throw new ArgumentNullException(nameof(articlePriceRepository)); _shopSignRepository = shopSignRepository ?? throw new ArgumentNullException(nameof(shopSignRepository)); _userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository)); }
//private readonly IStockGroupRepositoryAsync _stockGroupRepository; public CatalogService(IArticleRepositoryAsync articleRepository, IPriceListRepositoryAsync articlePriceRepository, IShopSignRepositoryAsync shopSignRepository, IUserRepositoryAsync userRepository) { _articleRepository = (ArticleCacheRepositoryAsync)articleRepository ?? throw new ArgumentNullException(nameof(articleRepository)); _articlePriceRepository = articlePriceRepository ?? throw new ArgumentNullException(nameof(articlePriceRepository)); _shopSignRepository = shopSignRepository ?? throw new ArgumentNullException(nameof(shopSignRepository)); _userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository)); //_stockGroupRepository = stockGroupRepository ?? throw new ArgumentNullException(nameof(stockGroupRepository)); }
public FavouritesController(IFavouriteRepositoryAsync favouriteRepository, IArticleRepositoryAsync articleRepository) { _favouriteRepository = favouriteRepository ?? throw new ArgumentNullException(nameof(favouriteRepository)); var ar = articleRepository ?? throw new ArgumentNullException(nameof(articleRepository)); ArticleCacheRepositoryAsync repository = ar as ArticleCacheRepositoryAsync; _articleRepository = repository ?? throw new ArgumentException($"The type of {nameof(articleRepository)} should be ArticleCacheRepositoryAsync"); }
public GetArticleByIdQueryHandler(IArticleRepositoryAsync articleRepository, IMapper mapper) { _articleRepository = articleRepository; _mapper = mapper; }
public GetAllArticleCategoryQueryHandler(IArticleRepositoryAsync articleRepository, IMapper mapper, IOptions <PaginationSettings> paginationSettings) { _articleRepository = articleRepository; _mapper = mapper; _paginationSettings = paginationSettings.Value; }