From 500a837038616794874d24a810269542094faf94 Mon Sep 17 00:00:00 2001 From: Fernando Araoz Date: Fri, 24 Jan 2025 06:28:19 -0500 Subject: [PATCH] chore: quitar controlador por defecto --- Controllers/WeatherForecastController.cs | 32 ------------------------ WeatherForecast.cs | 12 --------- 2 files changed, 44 deletions(-) delete mode 100644 Controllers/WeatherForecastController.cs delete mode 100644 WeatherForecast.cs diff --git a/Controllers/WeatherForecastController.cs b/Controllers/WeatherForecastController.cs deleted file mode 100644 index 979a771..0000000 --- a/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace MyApp.Controllers; - -[ApiController] -[Route("[controller]")] -public class WeatherForecastController : ControllerBase -{ - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - private readonly ILogger _logger; - - public WeatherForecastController(ILogger logger) - { - _logger = logger; - } - - [HttpGet(Name = "GetWeatherForecast")] - public IEnumerable Get() - { - 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(); - } -} diff --git a/WeatherForecast.cs b/WeatherForecast.cs deleted file mode 100644 index e0a7f26..0000000 --- a/WeatherForecast.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace MyApp; - -public class WeatherForecast -{ - public DateOnly Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string? Summary { get; set; } -}