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