Files
PersonaCasa/back/Controllers/IWantItAllController.cs
Alejandro Sarmiento eed3cb108f consulta tonta
echale un ojo si te apetece
2024-04-06 04:11:04 +02:00

41 lines
1.1 KiB
C#

using back.Application.Contracts.Services;
using back.Application.Services;
using back.Entities.DTOs.Request;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace back.Controllers
{
[Route("api/v1/[controller]")]
[ApiController]
public class IWantItAllController : ControllerBase
{
private readonly IWantItAllService service;
public IWantItAllController(IWantItAllService _service)
{
service = _service;
}
[HttpGet("GetAllAsyncAwait")]
public async Task<IActionResult> GetAllAsyncAwait()
{
return Ok(await service.GetWithAsyncAwait());
}
[HttpGet("GetAllTasks")]
public async Task<IActionResult> GetAllTasks()
{
return Ok(await service.GetWithTasks());
}
[HttpPost("locaAwait")]
public async Task<IActionResult> LocaAwait(ConsultaLoca dto)
{
Entities.Persona holi = await service.ConsultaLocaAwait(dto);
return base.Ok(holi);
}
}
}