12 lines
292 B
C#
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>();
|
|
}
|