public ProductUndercutters(IConfiguration configuration, IBrandUndercutters brandGetter) { _configuration = configuration; _brandGetter = brandGetter; _client = new HttpClient() { BaseAddress = new Uri(_configuration["UndercuttersBaseUri"]), Timeout = TimeSpan.FromSeconds(5) }; _client.DefaultRequestHeaders.Accept.ParseAdd("application/json"); }
public StoreController(StoreDb context, IConfiguration configuration, ICategoryUndercutters _undercuttersCategoryGetter, IBrandUndercutters _undercuttersBrandGetter, IProductUndercutters _undercuttersProductGetter, IProductRepository productRepository, IBrandRepository brandRepository, ICategoryRepository categoryRepository, IMapper mapper) { _configuration = configuration; undercuttersCategoryGetter = _undercuttersCategoryGetter; undercuttersBrandGetter = _undercuttersBrandGetter; undercuttersProductGetter = _undercuttersProductGetter; _productRepository = productRepository; _brandRepository = brandRepository; _categoryRepository = categoryRepository; _mapper = mapper; setupUndercutersClient(); }