public IEnumerable <WeatherForecastModel> WeatherForecasts(string ort) { if (!String.IsNullOrEmpty(ort) && ort.Equals("Munich", StringComparison.InvariantCultureIgnoreCase)) { return(_wheatherForecastService.GetForecast("Munich")); } var rng = new Random(); return(Enumerable.Range(1, 5).Select(index => new WeatherForecastModel { DateFormatted = DateTime.Now.AddDays(index).ToString("d"), TemperatureC = rng.Next(-20, 55), Summary = Summaries[rng.Next(Summaries.Length)] })); }
public IEnumerable <WeatherForecast> Get() { return(_wheatherForecastService.GetForecast()); }