using ChapterX.Domain.Repositories; using MediatR; using Microsoft.Extensions.Logging; namespace ChapterX.Application.Notification.Queries { public class GetAllHandler : IRequestHandler { private readonly INotificationRepository _notificationRepository; private readonly ILogger _logger; public GetAllHandler(INotificationRepository notificationRepository, ILogger logger) { _notificationRepository = notificationRepository; _logger = logger; } public async Task Handle(GetAllRequest request, CancellationToken cancellationToken) { var notifications = await _notificationRepository.GetAllAsync(cancellationToken); return new GetAllResponse(notifications); } } }