using MediatR; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using UserManagement.Data.Dto; using UserManagement.MediatR.Commands; using UserManagement.Repository; namespace UserManagement.MediatR.Handlers.UserNotification { public class MarkAllAsReadHandler : IRequestHandler { private readonly IUserNotificationRepository _userNotificationRepository; public MarkAllAsReadHandler(IUserNotificationRepository userNotificationRepository) { _userNotificationRepository = userNotificationRepository; } public async Task Handle(MarkAllAsReadCommand request, CancellationToken cancellationToken) { await _userNotificationRepository.MarkAllAsRead(); return new UserNotificationDto(); } } }