mirror of
https://github.com/farcasclaudiu/PracticeCalendar.git
synced 2026-06-22 09:01:18 +03:00
nice refactorings
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user