Add OutResController with MediatR integration
Introduced a new `OutResController` in the `ReC.API.Controllers`
namespace to handle API requests. The controller uses MediatR
for request handling and is decorated with `[ApiController]`
and `[Route("api/[controller]")]` attributes.
Added a `Get` method to process `ReadOutResQuery` objects
from query parameters and return the result via MediatR.
Included necessary `using` directives for dependencies.
This commit is contained in:
parent
aa34bdd279
commit
2cd7c035eb
12
src/ReC.API/Controllers/OutResController.cs
Normal file
12
src/ReC.API/Controllers/OutResController.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ReC.Application.OutResults.Queries;
|
||||
|
||||
namespace ReC.API.Controllers;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class OutResController(IMediator mediator) : ControllerBase
|
||||
{
|
||||
public async Task<IActionResult> Get([FromQuery] ReadOutResQuery query) => Ok(await mediator.Send(query));
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user