First idea of ResultModel
This commit is contained in:
		| @@ -1,39 +0,0 @@ | ||||
| using Microsoft.AspNetCore.Mvc; | ||||
| using Microsoft.Extensions.Logging; | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.Linq; | ||||
| using System.Threading.Tasks; | ||||
|  | ||||
| namespace FeatureWerkAPIs.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<WeatherForecastController> _logger; | ||||
|  | ||||
|         public WeatherForecastController(ILogger<WeatherForecastController> logger) | ||||
|         { | ||||
|             _logger = logger; | ||||
|         } | ||||
|  | ||||
|         [HttpGet] | ||||
|         public IEnumerable<WeatherForecast> Get() | ||||
|         { | ||||
|             var rng = new Random(); | ||||
|             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(); | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -1,15 +0,0 @@ | ||||
| using System; | ||||
|  | ||||
| namespace FeatureWerkAPIs | ||||
| { | ||||
|     public class WeatherForecast | ||||
|     { | ||||
|         public DateTime Date { get; set; } | ||||
|  | ||||
|         public int TemperatureC { get; set; } | ||||
|  | ||||
|         public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); | ||||
|  | ||||
|         public string Summary { get; set; } | ||||
|     } | ||||
| } | ||||
| @@ -7,7 +7,7 @@ | ||||
|     } | ||||
|   }, | ||||
|   "ConnectionStrings": { | ||||
|     "mariadb": "SERVER=127.0.0.1;DATABASE=testdb;PORT=3306;USER=root;PASSWORD=example", | ||||
|     "mariadb": "SERVER=localhost;DATABASE=textor_test;PORT=3333;USER=root;PASSWORD=$64,rf1209", | ||||
|     "postgres": "", | ||||
|     "sqlserver": "", | ||||
|     "oracle": "" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user