First idea of ResultModel

This commit is contained in:
Roland Fieger
2021-08-28 15:40:03 +02:00
parent 2de05c3856
commit 3b5ae86ce5
21 changed files with 139 additions and 187 deletions

View File

@@ -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();
}
}
}

View File

@@ -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; }
}
}

View File

@@ -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": ""