autobus-api_old/AutobusApi.Api/Controllers/BaseController.cs
2023-11-15 19:00:34 +02:00

13 lines
312 B
C#

using MediatR;
using Microsoft.AspNetCore.Mvc;
namespace AutobusApi.Api.Controllers;
[ApiController]
[Route("[controller]")]
public class BaseController : ControllerBase
{
private IMediator _mediator;
protected IMediator Mediator => _mediator ??= HttpContext.RequestServices.GetService<IMediator>();
}