Files
Web_SupplierManager_Prod/SupplierManager/Controllers/WeatherForecastController.cs
2025-11-20 09:14:00 +08:00

42 lines
1.2 KiB
C#

using Microsoft.AspNetCore.Mvc;
using SupplierManager.Models;
namespace SupplierManager.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()
{
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();
}
public string AAA()
{
//using var q = new AgentApprovalSystemContext();
//q.AasCompanyInfos.ToLinqToDB().LeftJoin(A=>A.Id==A.Id);
return "hello";
}
}
}