Primera subida
This commit is contained in:
31
back/Controllers/IWantItAllController.cs
Normal file
31
back/Controllers/IWantItAllController.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using back.Application.Contracts.Services;
|
||||
using back.Application.Services;
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user