public IndexModel(IGreetingService greetingService, IOptionsSnapshot <HomePageConfiguration> options,
                          IWeatherForecaster weatherForecaster)
        {
            _greetingService       = greetingService;
            _homePageConfiguration = options.Value;
            _weatherForecaster     = weatherForecaster;

            GreetingColor = _greetingService.GreetingColor ?? "black";
        }
        public IndexModel(IWeatherForecaster weatherForecaster, IGreetingService greetingService,
                          IProductsApiClient productsApiClient,
                          IOptionsSnapshot <HomePageConfiguration> options)

        {
            _weatherForecaster = weatherForecaster;
            _greetingService   = greetingService;
            _productsApiClient = productsApiClient;
            _homePageConfig    = options.Value;

            GreetingColour = _greetingService.GreetingColour ?? "black";
        }