aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Controllers/SampleDataController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Timeline/Controllers/SampleDataController.cs')
-rw-r--r--Timeline/Controllers/SampleDataController.cs46
1 files changed, 0 insertions, 46 deletions
diff --git a/Timeline/Controllers/SampleDataController.cs b/Timeline/Controllers/SampleDataController.cs
deleted file mode 100644
index 04e7f127..00000000
--- a/Timeline/Controllers/SampleDataController.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-
-namespace Timeline.Controllers
-{
- [Route("api/[controller]")]
- public class SampleDataController : Controller
- {
- private static string[] Summaries = new[]
- {
- "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
- };
-
- [HttpGet("[action]")]
- [Authorize]
- public IEnumerable<WeatherForecast> WeatherForecasts()
- {
- var rng = new Random();
- return Enumerable.Range(1, 5).Select(index => new WeatherForecast
- {
- DateFormatted = DateTime.Now.AddDays(index).ToString("d"),
- TemperatureC = rng.Next(-20, 55),
- Summary = Summaries[rng.Next(Summaries.Length)]
- });
- }
-
- public class WeatherForecast
- {
- public string DateFormatted { get; set; }
- public int TemperatureC { get; set; }
- public string Summary { get; set; }
-
- public int TemperatureF
- {
- get
- {
- return 32 + (int)(TemperatureC / 0.5556);
- }
- }
- }
- }
-}