public IEnumerable <WeatherForecast> Get() { _logger.LogInformationObject(LogEventIds.WeatherForecast2ControllerGetEnterInformation, _logContext); var rng = new Random(); _logger.LogInformationObject(LogEventIds.WeatherForecast2ControllerGetExitInformation, _logContext); return(Enumerable.Range(1, 5).Select(index => new WeatherForecast { Date = DateTime.Now.AddDays(index), TemperatureC = rng.Next(-20, 55), Summary = Summaries[rng.Next(Summaries.Length)] }) .ToArray()); }