[성현모] EFCore 기능 추, dll 버전 추가
This commit is contained in:
27
Projects/HubX/HubX.Server/Controllers/UniqueKeyController.cs
Normal file
27
Projects/HubX/HubX.Server/Controllers/UniqueKeyController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using HubX.Library.Http.Packet;
|
||||
using HubX.Server.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace HubX.Server.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]/[action]")]
|
||||
|
||||
public class UniqueKeyController
|
||||
{
|
||||
private readonly UniqueKeyService _uniqueKeyService;
|
||||
|
||||
public UniqueKeyController(UniqueKeyService uniqueKeyService)
|
||||
{
|
||||
_uniqueKeyService = uniqueKeyService;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IResult> InsertUniqueKey(Request_InsertUniqueKey request)
|
||||
{
|
||||
Response_InsertUniqueKy res = await _uniqueKeyService.Request_InsertUniqueKey(request);
|
||||
|
||||
return Results.Ok(res);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace HubX.Server.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(Name = "GetWeatherForecast")]
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user