classlib/ExpenseTracker.Api/Controllers/BaseController.cs
2024-08-07 21:12:02 +03:00

12 lines
292 B
C#

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