AvaloniaStack/Avalonia-API/Controllers/WeatherForecastController.cs

21 lines
588 B
C#
Raw Normal View History

using Avalonia_Services.Models;
using Avalonia_Services.Services;
using Microsoft.AspNetCore.Mvc;
namespace Avalonia_API.Controllers
{
[ApiController]
[Route("[controller]")]
public class WeatherForecastController(WeatherForecastService weatherForecastService) : ControllerBase
{
private readonly WeatherForecastService _weatherForecastService = weatherForecastService;
[HttpGet(Name = "GetWeatherForecast")]
public IEnumerable<WeatherForecast> Get()
{
return _weatherForecastService.GetWeatherForecasts();
}
}
}