using ChapterX.Domain.Repositories; using MediatR; using Microsoft.Extensions.Logging; namespace ChapterX.Application.Notification.Queries { public class GetHandler : IRequestHandler { private readonly INotificationRepository _notificationRepository; private readonly ILogger _logger; public GetHandler(INotificationRepository notificationRepository, ILogger logger) { _notificationRepository = notificationRepository; _logger = logger; } public async Task Handle(GetRequest request, CancellationToken cancellationToken) { var notification = await _notificationRepository.GetByIdAsync(request.Id, cancellationToken); return new GetResponse(notification); } } }