From 7226636074ce42d8dee45f0a7db9413af3bbbf9d Mon Sep 17 00:00:00 2001 From: shaikkhajaibrahim Date: Sun, 14 Apr 2024 17:52:06 +0530 Subject: [PATCH 1/2] added changes --- SampleApp/Controllers/WeatherForecastController.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SampleApp/Controllers/WeatherForecastController.cs b/SampleApp/Controllers/WeatherForecastController.cs index 32fd9dc..c840561 100644 --- a/SampleApp/Controllers/WeatherForecastController.cs +++ b/SampleApp/Controllers/WeatherForecastController.cs @@ -29,5 +29,10 @@ public IEnumerable Get() }) .ToArray(); } + + public IEnumerable GetAll() + { + return null; + } } } From fb832fd346fd1b48f15344608264d239923153f9 Mon Sep 17 00:00:00 2001 From: shaikkhajaibrahim Date: Sun, 14 Apr 2024 17:59:23 +0530 Subject: [PATCH 2/2] Added changes --- SampleApp/Controllers/WeatherForecastController.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/SampleApp/Controllers/WeatherForecastController.cs b/SampleApp/Controllers/WeatherForecastController.cs index c840561..a536cad 100644 --- a/SampleApp/Controllers/WeatherForecastController.cs +++ b/SampleApp/Controllers/WeatherForecastController.cs @@ -30,9 +30,18 @@ public IEnumerable Get() .ToArray(); } + + public IEnumerable GetAll() { - return null; + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = Summaries[Random.Shared.Next(Summaries.Length)] + }) + .ToArray(); + } } }