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