mirror of
https://github.com/farcasclaudiu/PracticeCalendar.git
synced 2026-06-22 09:01:18 +03:00
15 lines
369 B
C#
15 lines
369 B
C#
using MediatR;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace PracticeCalendar.API.Controllers
|
|
{
|
|
[ApiController]
|
|
[Route("api/[controller]")]
|
|
public class ApiControllerBase : ControllerBase
|
|
{
|
|
private ISender _mediator = null!;
|
|
|
|
protected ISender Mediator => _mediator ??= HttpContext.RequestServices.GetRequiredService<ISender>();
|
|
}
|
|
}
|