2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-07-03 23:53:12 +00:00

ASP.Net Support

This commit is contained in:
2024-09-08 22:37:54 +03:00
parent c8c291fe61
commit 7d9751501e
9 changed files with 176 additions and 1 deletions

View File

@ -0,0 +1,25 @@
using Esiur.Core;
using Esiur.Resource;
using Microsoft.AspNetCore.Mvc;
namespace Esiur.ASPNet.Controllers
{
[ApiController]
[Route("[controller]")]
public class MainController : ControllerBase
{
private readonly ILogger<MainController> _logger;
public MainController(ILogger<MainController> logger)
{
_logger = logger;
}
[HttpGet(Name = "Get")]
public async AsyncReply<MyResource> Get()
{
return await Warehouse.Get<MyResource>("/sys/demo");
}
}
}